var _puser = pageMessage.user;
var _toDomain = pageMessage.toDomain;
var _domain = pageMessage.domain;
(function (c) {
    var a = 0;
    var b = +new Date();
    var d = c.cookie("firVist") || b;
    if (_puser.uid) {
        a = Math.floor((b / 1000 - _puser.ltime / 1) / (24 * 60 * 60))
    } else {
        a = Math.floor((b / 1000 - d / 1) / (24 * 60 * 60))
    }
    _puser.isNewUser = a <= 3 ? 1 : 0
})(jQuery);
(function (a) {
    if (_puser.uid && _puser.supremeMystery == 1) {
        a.getJSON("/user/supremeMystery/getOriginal.php", function (c) {
            if (c.flag == "001" && c.content.rid) {
                var b = c.content;
                var d = a("#myAccountTool");
                _puser.rid = b.rid;
                _puser.nickname = b.alias;
                _puser.pic = b.picuser;
                _puser.rich = b.coin6Rank;
                _puser.coin6pic = "";
                d.find("a").attr("href", pageMessage.toDomain + "/" + _puser.rid);
                d.find("a img").attr("src", _puser.pic);
                d.find("a em").html(_puser.nickname)
            }
        })
    }
})(jQuery);
(function () {
    window.apng_support = false;
    var c = document.createElement("canvas");
    if (!c || !c.getContext) {
        return
    }
    var b = new Image(),
        a = c.getContext("2d");
    b.onload = function () {
        a.drawImage(b, 0, 0);
        window.apng_support = a.getImageData(0, 0, 1, 1).data[3] === 0;
        if (apng_support) {
            jQuery(document.body).addClass("apng-support")
        }
    };
    b.src = ""
})();
(function (c) {
    c.__PageVisible = {
        isVisible: true,
        events: {},
        addEvent: function (e, d) {
            this.events[e] = d
        },
        delEvent: function (d) {
            delete this.events[d]
        },
        __onVisibilityChange: function () {
            if (document[b]) {
                this.isVisible = false
            } else {
                this.isVisible = true
            }
            for (var d in this.events) {
                this.events[d](this.isVisible)
            }
        }
    };
    var b, a;
    if (typeof document.hidden !== "undefined") {
        b = "hidden";
        a = "visibilitychange"
    } else {
        if (typeof document.msHidden !== "undefined") {
            b = "msHidden";
            a = "msvisibilitychange"
        } else {
            if (typeof document.webkitHidden !== "undefined") {
                b = "webkitHidden";
                a = "webkitvisibilitychange"
            }
        }
    }
    if (typeof document[b] === "undefined") {
        __PageVisible.isSupport = false
    } else {
        __PageVisible.isSupport = true;
        jQuery(document).on(a, function (d) {
            __PageVisible.__onVisibilityChange()
        })
    }
})(window);
(function () {
    if (!Array.forEach && !Array.prototype.forEach) {
        Array.prototype.forEach = function (b) {
            for (var a = 0; a < this.length; a++) {
                b.apply(this, [this[a], a, this])
            }
        }
    }
})();
jQuery('<div id="page_float_right_bottom" style="width:80px;text-align:center; position:fixed; z-index:495; right:8px; bottom:30px"/>').appendTo(document.body);

function InsertPageFloatRightBottom(a, d) {
    var f = jQuery("#page_float_right_bottom");
    var e = f.children();
    var b = null;
    for (var c = e.length - 1; c >= 0; c--) {
        if (d > e.eq(c).data("sort") / 1) {
            b = e.eq(c);
            break
        }
    }
    a.data("sort", d);
    if (b) {
        a.insertAfter(b)
    } else {
        a.prependTo(f)
    }
    return a
}
jQuery.fn.lazyLoadImg = function (b, a, f) {
    var d = jQuery,
        c = this,
        e = a || d(window);
    if (e.___lazyImage___) {
        e.off("scroll", e.___lazyImage___);
        e.___lazyImage___ = null
    }
    e.___lazyImage___ = function () {
        var g = e.height() + e.scrollTop() + 10,
            i = 0,
            h = [];
        d.each(c, function (l, m) {
            var k = d(m),
                j = k.offset().top;
            if (k.attr(b)) {
                i++;
                if (g >= j && k[0].offsetHeight > 0) {
                    k[0].onload = function () {
                        k.css("opacity", 1)
                    };
                    k.attr("src", k.attr(b));
                    k.removeAttr(b);
                    h.push(k)
                }
            }
        });
        if (i < 1) {
            e.off("scroll resize", e.___lazyImage___)
        }
        if (h.length) {
            f && f(e, h, c)
        }
    };
    e.on("scroll resize", e.___lazyImage___);
    e.___lazyImage___()
};
var __KEY = {
    k: [],
    t: 0,
    events: {},
    addEvent: function (b, a) {
        if (this.events[b]) {
            Prompt.alert(b + " 已经被占用")
        } else {
            this.events[b] = a
        }
    },
    addEvents: function (b) {
        for (var a in b) {
            this.addEvent(a, b[a])
        }
    },
    test: function (a) {
        clearTimeout(this.t);
        this.k.push(a);
        var b = this.k.join("");
        if (this.events[b]) {
            this.empty();
            this.events[b]()
        } else {
            this.t = setTimeout(jQuery.proxy(this.empty, this), 800)
        }
    },
    empty: function () {
        this.k = []
    }
};
jQuery(document).bind("keydown", function (a) {
    if (a.altKey && a.which >= 48 && a.which <= 57) {
        __KEY.test(a.which)
    }
});
var UID = new Date().getTime();
jQuery.extend(String, {
    uniqueID: function () {
        return (UID++).toString(36)
    }
});
(function (a) {
    a.getUrlParam = function (c) {
        var d = new RegExp("(^|&)" + c + "=([^&]*)(&|$)");
        var b = window.location.search.substr(1).match(d);
        return b ? decodeURIComponent(b[2]) : null
    };
    a.getUrlParams = function (c) {
        var f = (c || location.search).split("?")[1];
        if (!f) {
            return false
        }
        var b = f.split("&");
        if (b.length > 0) {
            _params = {};
            for (var d = 0; d < b.length; d++) {
                var e = b[d].split("=");
                _params[e[0]] = e[1]
            }
            return _params
        } else {
            return false
        }
    };
    a.serialize = function (c) {
        var d = [];
        for (var b in c) {
            if (c.hasOwnProperty(b)) {
                d.push(encodeURIComponent(b) + "=" + encodeURIComponent(c[b]))
            }
        }
        return d.join("&")
    }
})(jQuery);
(function () {
    var a = {};
    var d = {};
    var b = navigator.userAgent.toLowerCase();
    var c;
    (c = b.match(/edge\/([\d.]+)/)) ? (d.edge = c[1]) : (c = b.match(/rv:([\d.]+)\) like gecko/)) ? (d.ie = c[1]) : (c = b.match(/msie ([\d.]+)/)) ? (d.ie = c[1]) : (c = b.match(/firefox\/([\d.]+)/)) ? (d.firefox = c[1]) : (c = b.match(/chrome\/([\d.]+)/)) ? (d.chrome = c[1]) : (c = b.match(/opera.([\d.]+)/)) ? (d.opera = c[1]) : (c = b.match(/version\/([\d.]+).*safari/)) ? (d.safari = c[1]) : 0;
    if (d.edge) {
        a = {
            name: "edge",
            version: d.edge
        }
    }
    if (d.ie) {
        a = {
            name: "ie",
            version: d.ie
        }
    }
    if (d.firefox) {
        a = {
            name: "firefox",
            version: d.firefox
        }
    }
    if (d.chrome) {
        a = {
            name: "chrome",
            version: d.chrome
        }
    }
    if (d.opera) {
        a = {
            name: "opera",
            version: d.opera
        }
    }
    if (d.safari) {
        a = {
            name: "safari",
            version: d.safari
        }
    }
    a.version = parseFloat(a.version);
    window.MyBrowser = a
})();
(function (b) {
    window.browserUpdate = function (c) {
        b.ajax({
            dataType: "text",
            url: "/js/tpls/base/browserUpdate_v2.html",
            success: function (f) {
                var e = b(f).appendTo(document.body);
                var d = e.filter(".browserUpdate");
                if (c) {
                    toZhangZhi("showbtn", "browserUpdate")
                } else {
                    d.find(".p1").html("您的浏览器已过时，不支持此功能！");
                    toZhangZhi("showbtn", "browserUpdateClick")
                }
                d.show();
                Mask.create(0.3, 99998);
                d.find("a.close").on("click", function () {
                    d.remove();
                    e.remove();
                    Mask.remove()
                })
            }
        })
    };
    if (location.href.indexOf("/lieBao") > -1) {
        return
    }
    if (location.href.indexOf("/event/") > -1) {
        return
    }
    setTimeout(function () {
        toZhangZhi("showbtn", "browserPC")
    }, 500);
    if (MyBrowser.name != "ie") {
        return
    }
    if (MyBrowser.version >= 8) {
        setTimeout(function () {
            toZhangZhi("showbtn", "browserIE" + MyBrowser.version)
        }, 500)
    }
    if (MyBrowser.version <= 8) {
        browserUpdate(1)
    } else {
        var a = b.cookie("_browserUpdate");
        if (!a) {
            browserUpdate(1);
            b.cookie("_browserUpdate", 1)
        }
    }
})(jQuery);

function calert(e, c) {
    var b = jQuery("#calert_box");
    if (b.length < 1) {
        b = jQuery("<div>", {
            "class": "calert calert-fade",
            id: "calert_box",
            html: '<div class="CB"><div class="CON"></div></div>'
        }).appendTo(document.body)
    }
    var d = c ? "removeClass" : "addClass";
    b[d]("calert-error").find(".CON").html(e);
    setTimeout(function () {
        b.removeClass("calert-fade")
    }, 1);
    var a = !(jQuery.browser.msie && jQuery.browser.version < 10);
    if (!a) {
        jQuery("#calert_box").stop().animate({
            width: document.documentElement.clientWidth,
            opacity: 1
        }, 320)
    }
    if (window.alert_time) {
        clearTimeout(window.alert_time)
    }
    window.alert_time = setTimeout(function () {
        jQuery("#calert_box").addClass("calert-fade");
        if (!a) {
            jQuery("#calert_box").stop().animate({
                width: 1,
                opacity: 0
            }, 300)
        }
    }, 2500)
}
if (!window.console) {
    window.console = {
        log: function () {}
    }
}
jQuery.extend(Number, {
    random: function (b, a) {
        return Math.floor(Math.random() * (a - b + 1) + b)
    }
});

function no_coin6() {
    try {
        Prompt.close(0)
    } catch (a) {}
    Prompt.create({
        content: "您的六币余额不足，是否现在充值？",
        btn_sure: {
            text: "马上充值",
            link: "/user/payshow.php?i=2",
            target: "_blank"
        },
        btn_cancel: {
            text: "稍后充值"
        },
        tracing: "coin6floor"
    })
}
var v6;
(function () {
    var a = jQuery;
    v6 = {
        addWinFocus: function (b) {
            a(window).bind("focus", b)
        },
        addWinBlur: function (b) {
            a(window).bind("blur", b)
        },
        createFace: function (c) {
            var b = this.faceBox;
            if (b) {
                return b
            }
            this.faceBox = {};
            this.faceBox.box = a("<div/>", {
                id: "pubFaceBox",
                "class": "pubFaceBox",
                style: "display:block; visibility:hidden"
            }).appendTo(document.body);
            a.extend(this.faceBox, {
                vis: 0,
                btn: null,
                fname: c.fname || "fname",
                isInit: 0,
                insertFace: function (d) {
                    if (this.input.val() == this.alt) {
                        this.input.val("")
                    }
                    insertFace(this.input[0], d);
                    this.input.focus()
                },
                gifInit: function () {
                    this.isInit = 1;
                    var f = document.createElement("table"),
                        e = 0,
                        g = 0,
                        d, s = f.insertRow(e++);
                    this.box.append(f);
                    var u = 9;
                    var l = [];
                    for (d in FaceSymbols) {
                        l.push([d, FaceSymbols[d]])
                    }
                    var r = l.length,
                        k = 0;
                    for (; k < r; k++) {
                        if (k % u == 0 && k != 0) {
                            s = f.insertRow(e++)
                        }
                        var j = s.insertCell(k % u);
                        var h = l[k];
                        var t = h[1].slice(1);
                        j.innerHTML = '<a title="' + t + '"><img alt="' + t + '" src="' + FaceUrl + h[0] + '.gif" /></a>'
                    }
                    var q = r % u ? u - (r % u) : 0,
                        s = f.rows[f.rows.length - 1];
                    for (var k = 0; k < q; k++) {
                        var j = s.insertCell(s.cells.length);
                        j.innerHTML = "&nbsp";
                        j.style.cursor = "default"
                    }
                    f = s = l = null;
                    var o = this;
                    this.box.on("click", "a", function (m) {
                        m.preventDefault();
                        var i = a(this);
                        o.insertFace("/" + i.attr("title"));
                        o.iHidden()
                    })
                },
                visible: function (d, m, i) {
                    if (this.btn !== null) {
                        return this.iHidden()
                    }
                    if (!this.isInit) {
                        this.gifInit()
                    }
                    this.btn = a(d);
                    this.input = a(m);
                    this.alt = i;
                    var k = this.btn.offset(),
                        l = {
                            width: this.btn.width(),
                            height: this.btn.height(),
                            left: k.left,
                            top: k.top
                        },
                        j = this.box.offset(),
                        f = {
                            width: this.box.innerWidth(),
                            height: this.box.innerHeight(),
                            left: j.left,
                            top: j.top
                        },
                        h = {
                            width: a(window).width(),
                            height: a(window).width(),
                            left: 0
                        },
                        g, e;
                    f.height = 250;
                    if (l.left + f.width < h.left + h.width || l.left + l.width < f.width) {
                        g = l.left
                    } else {
                        g = l.left + l.width - f.width
                    }
                    if (l.top - a(window).scrollTop() < f.height) {
                        e = l.top + l.height
                    } else {
                        e = l.top - f.height
                    }
                    this.box.css({
                        top: e,
                        left: g,
                        visibility: "visible"
                    });
                    this.vis = 1;
                    document[this.fname] = a.proxy(this.dev, this);
                    a(document.body).bind("click", document[this.fname])
                },
                iHidden: function () {
                    this.box.css("visibility", "hidden");
                    this.vis = 0;
                    a(document.body).unbind("click", document[this.fname]);
                    document[this.fname] = null;
                    this.btn = null;
                    this.input = null;
                    this.alt = "";
                    return false
                },
                dev: function (e) {
                    var d = e.target;
                    while (d.tagName.toLowerCase() != "body") {
                        if (d == this.box[0] || d == this.btn[0]) {
                            return
                        }
                        d = d.parentNode
                    }
                    this.iHidden()
                }
            });
            return this.faceBox
        },
        setCursorPos: function (c, d) {
            if (c.setSelectionRange) {
                c.focus();
                c.setSelectionRange(d, d)
            } else {
                if (c.createTextRange) {
                    var b = c.createTextRange();
                    b.collapse(true);
                    b.moveEnd("character", d);
                    b.moveStart("character", d);
                    b.select()
                }
            }
        },
        pop: {
            create: function (b) {
                if (!this.box) {
                    this.box = a("<div/>", {
                        id: "popBox",
                        "class": "popbox",
                        html: '<div class="wrap">					<div class="hd"><h2>' + b.title + '</h2><span class="close" onclick="v6.pop.remove()"></span></div>					<div class="bd">					' + b.con + "					</div></div>"
                    }).appendTo(document.body).css("top", (document.documentElement.scrollTop || document.body.scrollTop) + 100);
                    getMask()
                } else {
                    this.box.find("h2").eq(0).html(b.title);
                    this.box.find("div.bd").html(b.con)
                }
                return a("#popBox")
            },
            remove: function () {
                a("#popBox").remove();
                a("#loginMask").remove();
                a("#loginMaskBg").remove();
                delete this.box
            }
        },
        jsonp: function (e) {
            var f, d, c = e.pars || {},
                b = e.callback || function () {};
            f = a.getJSON(e.api, c, b)
        }
    }
})();
var Rank = {
    wealth: {
        1: 1000,
        2: 5000,
        3: 15000,
        4: 30000,
        5: 50000,
        6: 100000,
        7: 200000,
        8: 400000,
        9: 650000,
        10: 1000000,
        11: 1500000,
        12: 2000000,
        13: 2500000,
        14: 3500000,
        15: 5000000,
        16: 8000000,
        17: 12000000,
        18: 17000000,
        19: 23000000,
        20: 30000000,
        21: 38000000,
        22: 47000000,
        23: 57000000,
        24: 68000000,
        25: 128000000,
        26: 256000000,
        27: 512000000,
        28: 768000000,
        29: 1024000000,
        30: 1280000000,
        31: 1536000000,
        32: 1792000000,
        33: 2048000000,
        34: 2366666666,
        35: 2888888888,
        36: 3888888888
    },
    live: {
        1: 1000,
        2: 5000,
        3: 15000,
        4: 30000,
        5: 50000,
        6: 100000,
        7: 200000,
        8: 350000,
        9: 550000,
        10: 800000,
        11: 1200000,
        12: 1500000,
        13: 2000000,
        14: 3000000,
        15: 5000000,
        16: 8000000,
        17: 12000000,
        18: 18000000,
        19: 25000000,
        20: 33000000,
        21: 41000000,
        22: 50000000,
        23: 60000000,
        24: 70000000,
        25: 80000000,
        26: 90000000,
        27: 100000000,
        28: 110000000,
        29: 125000000,
        30: 150000000,
        31: 175000000,
        32: 200000000,
        33: 230000000,
        34: 260000000,
        35: 290000000,
        36: 330000000,
        37: 370000000,
        38: 420000000,
        39: 470000000,
        40: 500000000,
        41: 530000000,
        42: 560000000,
        43: 590000000,
        44: 620000000,
        45: 650000000,
        46: 680000000,
        47: 710000000,
        48: 740000000,
        49: 770000000,
        50: 800000000,
        51: 830000000,
        52: 860000000,
        53: 890000000,
        54: 920000000,
        55: 950000000,
        56: 980000000,
        57: 1010000000,
        58: 1040000000,
        59: 1070000000,
        60: 1100000000,
        61: 1130000000,
        62: 1160000000,
        63: 1190000000,
        64: 1220000000,
        65: 1250000000,
        66: 1280000000,
        67: 1310000000,
        68: 1340000000,
        69: 1370000000,
        70: 1400000000,
        71: 1430000000,
        72: 1460000000,
        73: 1490000000,
        74: 1520000000,
        75: 1550000000,
        76: 1580000000,
        77: 1610000000,
        78: 1640000000,
        79: 1670000000,
        80: 1700000000,
        81: 1730000000,
        82: 1760000000,
        83: 1790000000,
        84: 1820000000,
        85: 1850000000,
        86: 1880000000,
        87: 1910000000,
        88: 1940000000,
        89: 1970000000,
        90: 2000000000,
        91: 2030000000,
        92: 2060000000,
        93: 2090000000,
        94: 2120000000,
        95: 2150000000,
        96: 2180000000,
        97: 2210000000,
        98: 2240000000,
        99: 2270000000,
        100: 2300000000,
        101: 2330000000,
        102: 2360000000,
        103: 2390000000,
        104: 2420000000,
        105: 2450000000,
        106: 2480000000,
        107: 2510000000,
        108: 2540000000,
        109: 2570000000,
        110: 2600000000,
        111: 2630000000,
        112: 2660000000,
        113: 2690000000,
        114: 2720000000,
        115: 2750000000,
        116: 2780000000,
        117: 2810000000,
        118: 2840000000,
        119: 2870000000,
        120: 2900000000,
        121: 2930000000,
        122: 2960000000,
        123: 2990000000,
        124: 3020000000,
        125: 3050000000,
        126: 3080000000,
        127: 3110000000,
        128: 3140000000,
        129: 3170000000,
        130: 3200000000,
        131: 3230000000,
        132: 3260000000,
        133: 3290000000,
        134: 3320000000,
        135: 3350000000,
        136: 3380000000,
        137: 3410000000,
        138: 3440000000,
        139: 3470000000,
        140: 3500000000,
        141: 3530000000,
        142: 3560000000,
        143: 3590000000,
        144: 3620000000,
        145: 3650000000,
        146: 3680000000,
        147: 3710000000,
        148: 3740000000,
        149: 3770000000
    },
    oldWealth: {
        "0": {
            r: 0,
            t: "0富",
            u: "pc/0.png",
            c: 0,
            s: "0|90,45|108,54|60,30|90,45|135,68"
        },
        "1": {
            r: 1,
            t: "1富",
            u: "pc/1.png",
            c: 1000,
            s: "0|90,45|108,54|60,30|90,45|135,68"
        },
        "2": {
            r: 2,
            t: "2富",
            u: "pc/2.png",
            c: 5000,
            s: "0|90,45|108,54|60,30|90,45|135,68"
        },
        "3": {
            r: 3,
            t: "3富",
            u: "pc/3.png",
            c: 15000,
            s: "0|90,45|108,54|60,30|90,45|135,68"
        },
        "4": {
            r: 4,
            t: "4富",
            u: "pc/4.png",
            c: 30000,
            s: "0|90,45|108,54|60,30|90,45|135,68"
        },
        "5": {
            r: 5,
            t: "5富",
            u: "pc/5.png",
            c: 50000,
            s: "0|90,45|108,54|60,30|90,45|135,68"
        },
        "6": {
            r: 6,
            t: "6富",
            u: "pc/6.png",
            c: 100000,
            s: "0|90,45|108,54|60,30|90,45|135,68"
        },
        "7": {
            r: 7,
            t: "7富",
            u: "pc/7.png",
            c: 200000,
            s: "0|90,45|108,54|60,30|90,45|135,68"
        },
        "8": {
            r: 8,
            t: "8富",
            u: "pc/8.png",
            c: 400000,
            s: "0|90,45|108,54|60,30|90,45|135,68"
        },
        "9": {
            r: 9,
            t: "9富",
            u: "pc/9.png",
            c: 650000,
            s: "0|90,45|108,54|60,30|90,45|135,68"
        },
        "10": {
            r: 10,
            t: "10富",
            u: "pc/10.png",
            c: 1000000,
            s: "0|90,45|108,54|60,30|90,45|135,68"
        },
        "11": {
            r: 11,
            t: "男爵",
            u: "pc/11.png",
            c: 1500000,
            s: "0|99,45|117,54|66,30|99,45|149,68"
        },
        "12": {
            r: 12,
            t: "子爵",
            u: "pc/12.png",
            c: 2000000,
            s: "0|99,45|117,54|66,30|99,45|149,68"
        },
        "13": {
            r: 13,
            t: "伯爵",
            u: "pc/13.png",
            c: 2500000,
            s: "0|99,45|117,54|66,30|99,45|149,68"
        },
        "14": {
            r: 14,
            t: "侯爵",
            u: "pc/14.png",
            c: 3500000,
            s: "0|99,45|117,54|66,30|99,45|149,68"
        },
        "15": {
            r: 15,
            t: "公爵",
            u: "pc/15.png",
            c: 5000000,
            s: "0|99,45|117,54|66,30|99,45|149,68"
        },
        "16": {
            r: 16,
            t: "郡公",
            u: "pc/16.png",
            c: 8000000,
            s: "0|99,45|117,54|66,30|99,45|149,68"
        },
        "17": {
            r: 17,
            t: "国公",
            u: "pc/17.png",
            c: 12000000,
            s: "0|99,45|117,54|66,30|99,45|149,68"
        },
        "18": {
            r: 18,
            t: "王爵",
            u: "pc/18.png",
            c: 17000000,
            s: "0|114,45|135,54|76,30|114,45|171,68"
        },
        "19": {
            r: 19,
            t: "藩王",
            u: "pc/19.png",
            c: 23000000,
            s: "0|114,45|135,54|76,30|114,45|171,68"
        },
        "20": {
            r: 20,
            t: "郡王",
            u: "pc/20.png",
            c: 30000000,
            s: "0|114,45|135,54|76,30|114,45|171,68"
        },
        "21": {
            r: 21,
            t: "亲王",
            u: "pc/21.png",
            c: 38000000,
            s: "0|114,45|135,54|76,30|114,45|171,68"
        },
        "22": {
            r: 22,
            t: "国王",
            u: "pc/22.png",
            c: 47000000,
            s: "0|114,45|135,54|76,30|114,45|171,68"
        },
        "23": {
            r: 23,
            t: "皇帝",
            u: "pc/23.png",
            c: 57000000,
            s: "0|114,45|135,54|76,30|114,45|171,68"
        },
        "24": {
            r: 24,
            t: "大帝",
            u: "pc/24.png",
            c: 68000000,
            s: "0|114,45|135,54|76,30|114,45|171,68"
        },
        "25": {
            r: 25,
            t: "神",
            u: "pc/25.png",
            c: 128000000,
            s: "0|120,51|144,60|80,34|120,51|180,78"
        },
        "26": {
            r: 26,
            t: "众神之神",
            u: "pc/26.png",
            c: 256000000,
            s: "0|132,60|156,69|88,40|132,60|198,90"
        },
        "27": {
            r: 27,
            t: "创世大神",
            u: "pc/27.png",
            c: 512000000,
            s: "0|132,54|156,63|88,36|132,54|198,81"
        },
        "28": {
            r: 28,
            t: "创世神王",
            u: "pc/28.png",
            c: 768000000,
            s: "0|132,57|156,69|88,38|132,57|198,86"
        },
        "29": {
            r: 29,
            t: "创世神皇",
            u: "pc/29.png",
            c: 1024000000,
            s: "0|132,60|156,72|88,40|132,60|198,90"
        },
        "30": {
            r: 30,
            t: "创世神帝",
            u: "pc/30.png",
            c: 1280000000,
            s: "0|150,63|180,75|100,42|150,63|225,95"
        },
        "31": {
            r: 31,
            t: "创世天尊",
            u: "pc/31.png",
            c: 1536000000,
            s: "0|186,68|222,78|124,45|186,68|279,102"
        },
        "32": {
            r: 32,
            t: "元始天尊",
            u: "pc/32.png",
            c: 1792000000,
            s: "0|232,66|280,80|154,44|232,66|352,100"
        },
        "33": {
            r: 33,
            t: "无量天尊",
            u: "pc/33.png",
            c: 2048000000,
            s: "0|240,66|293,80|160,44|240,66|364,100"
        },
        "34": {
            r: 34,
            t: "鸿蒙神尊",
            u: "pc/34.png",
            c: 2366666666,
            s: "0|242,66|384,105|160,44|240,66|364,100"
        },
        "35": {
            r: 35,
            t: "鸿蒙主宰",
            u: "pc/35.png",
            c: 2888888888,
            s: "0|261,66|416,105|174,44|261,66|396,100"
        },
        "36": {
            r: 36,
            t: "自由主宰",
            u: "pc/36.png",
            c: 3888888888,
            s: "0|261,66|416,105|174,44|261,66|396,100"
        }
    }
};
var WB;
(function () {
    var a = jQuery;
    WB = {
        parseClientSource: function (c) {
            if (!c) {
                return ""
            }
            var b = "";
            var d = "";
            switch (c) {
                case "0":
                    b = "/event/liveClient/?t=pad";
                    d = "iPad";
                    break;
                case "1":
                    b = "/event/liveClient/?t=phone";
                    d = "iPhone";
                    break;
                case "2":
                    b = "/event/liveClient/?t=pad";
                    d = "Android";
                    break;
                case "3":
                    b = "/event/liveClient/?t=phone";
                    d = "Android";
                    break
            }
            return ('<a class="from-mobile-client" href="' + b + '" target="_blank"><i></i>来自' + d + "</a>")
        },
        transFileUrl: function (c, b) {
            if (!c) {
                return ""
            }
            return c.replace(/^(\S+?)(?:_(?:s|b|ls))?(\.[^\.]+)$/, "$1" + (b || "") + "$2")
        }
    }
})();
var MiniVideo;
(function () {
    MiniVideo = function (a) {
        this.H5_CSS = "//g.alicdn.com/de/prismplayer/2.9.3/skins/default/aliplayer-min.css";
        this.H5_URL = "//g.alicdn.com/de/prismplayer/2.9.3/aliplayer-h5-min.js";
        this.FLASH_URL = "//g.alicdn.com/de/prismplayer/2.8.7/aliplayer-flash-min.js";
        this.JSON_URL = "//g.alicdn.com/de/prismplayer/2.8.7/json/json.min.js";
        this._fid = "_mvideo_" + String.uniqueID();
        this._player = null;
        this._conf = a || {};
        this._callback = []
    };
    jQuery.extend(MiniVideo.prototype, {
        getConf: function () {
            return this._conf
        },
        createBox: function () {
            var b = this._fid;
            var a = jQuery("<div/>", {
                "class": "mini-video-expand"
            });
            a.html('<div class="arrow-icon"><i class="ico">◆</i><i class="ico ico2">◆</i></div>				<p class="feed-media-action-wrap">					<a class="feed-media-action  mini-video-collapse" href="#collapseMiniVideo" cm="in" class=""><i></i>收起</a>				</p>				<div class="feed-meida-miniVideo">					<div id="' + b + '">视频加载中..</div>				</div>');
            return a
        },
        loadVideo: function (b, h) {
            var f = this;
            var g = this.conf;
            var d = this._fid;
            var e = jQuery(b);
            var j = this;
            console.log(e);
            h = h || {};
            if (!e[0]) {
                return
            }
            var i = this.getPlayerType();
            var c = function () {
                e.replaceWith('<div id="' + d + '" ></div>');
                j.loadPlayer();
                j.on("ready", function () {
                    var k = f._player;
                    k.setVolume(0);
                    setTimeout(function () {
                        k.play()
                    }, 200);
                    h.onReady && h.onReady()
                });
                if (i == "no-support") {
                    h.onNoSupport && h.onNoSupport()
                }
            };
            var a = swfobject.ua.pv[0];
            if (i == "flash" && a < 1) {
                e.css("visibility", "visible")
            } else {
                c()
            }
        },
        loadPlayerById: function (c) {
            var a = jQuery("#" + c);
            var b = this.getFid();
            if (a.length > 0) {
                a.replaceWith('<div id="' + b + '" ></div>');
                this.loadPlayer()
            }
        },
        loadPlayer: function () {
            var a = this;
            var c = this.getConf();
            var f = this._fid;
            var d = jQuery("#" + f);
            var e = this.getPlayerType();
            var b = window.swfobject ? swfobject.ua.pv[0] : 0;
            if (e == "no-support") {
                d.html("您当前的浏览器不支持播放该视频，请升级您的浏览器！（支持IE8以上版本及其它主流浏览器）")
            } else {
                if (e == "flash" && b < 1) {
                    d.css("visibility", "visible")
                } else {
                    jQuery.getJSON("/minivideo/auth.php", {
                        act: "play",
                        vid: c.vid,
                        _t: +new Date()
                    }).done(function (g) {
                        if (g.flag == "001") {
                            d.empty();
                            if (e == "h5" && !jQuery("#mini_video_css")[0]) {
                                a._loadH5Css()
                            }
                            if (e == "flash") {
                                $LAB.script(a.JSON_URL).wait()
                            }
                            $LAB.script(e == "h5" ? a.H5_URL : a.FLASH_URL).wait(function () {
                                try {
                                    var j = new Aliplayer({
                                        id: f,
                                        width: c.width || "100%",
                                        height: c.height || "100%",
                                        autoplay: c.autoplay,
                                        cover: c.cover || "//vr1.xiu123.cn/imges/live/CSSIMG/mini_video_cover.png",
                                        rePlay: c.replay || false,
                                        source: g.content.mp4url,
                                        sound: 0,
                                        showBarTime: 1000,
                                        skinRes: "//vr1.xiu123.cn/imges/live/events/mini_video/skin",
                                        skinLayout: [{
                                            name: "bigPlayButton",
                                            align: "cc"
                                        }, {
                                            name: "loading",
                                            align: "cc"
                                        }, {
                                            name: "controlBar",
                                            align: "blabs",
                                            x: 0,
                                            y: 0,
                                            children: [{
                                                name: "progress",
                                                align: "tlabs",
                                                x: 0,
                                                y: 0
                                            }, {
                                                name: "playButton",
                                                align: "tl",
                                                x: 15,
                                                y: e == "h5" ? 11 : 26
                                            }, {
                                                name: "nextButton",
                                                align: "tl",
                                                x: 10,
                                                y: e == "h5" ? 11 : 26
                                            }, {
                                                name: "timeDisplay",
                                                align: "tl",
                                                x: 10,
                                                y: e == "h5" ? 5 : 24
                                            }, {
                                                name: "fullScreenButton",
                                                align: "tr",
                                                x: 10,
                                                y: e == "h5" ? 11 : 25
                                            }, {
                                                name: "streamButton",
                                                align: "tr",
                                                x: 10,
                                                y: e == "h5" ? 11 : 23
                                            }, {
                                                name: "volume",
                                                align: "tr",
                                                x: 10,
                                                y: e == "h5" ? 11 : 25
                                            }]
                                        }, {
                                            name: "fullControlBar",
                                            align: "tlabs",
                                            x: 0,
                                            y: 0,
                                            children: [{
                                                name: "fullTitle",
                                                align: "tl",
                                                x: 25,
                                                y: 6
                                            }, {
                                                name: "fullNormalScreenButton",
                                                align: "tr",
                                                x: 24,
                                                y: 13
                                            }, {
                                                name: "fullTimeDisplay",
                                                align: "tr",
                                                x: 10,
                                                y: 12
                                            }, {
                                                name: "fullZoom",
                                                align: "cc"
                                            }]
                                        }]
                                    });
                                    j.on("ready", jQuery.proxy(a, "_playerReady", j));
                                    j.on("error", jQuery.proxy(a, "_errorHandler"));
                                    var l = a._callback;
                                    if (l.length > 0) {
                                        for (var h = 0; h < l.length; h++) {
                                            j.on(l[h][0], l[h][1])
                                        }
                                    }
                                } catch (k) {
                                    console.log("loadMiniVideoPlayer", k)
                                }
                            })
                        } else {
                            d.html(g.content)
                        }
                    })
                }
            }
        },
        destroyPlayer: function () {
            try {
                if (this._player) {
                    this._player.pause();
                    this._player.dispose();
                    this._player = null
                }
            } catch (a) {
                console.log("destroyMiniVideoPlayer", a)
            }
        },
        on: function (a, b) {
            if (this._player) {
                this._player.on(a, b)
            } else {
                this._callback.push([a, b])
            }
        },
        getFid: function () {
            return this._fid
        },
        getPlayer: function () {
            return this._player
        },
        getPlayerType: function () {
            var a = jQuery.browser.msie && jQuery.browser.version < 10;
            var b = jQuery.browser.msie && jQuery.browser.version < 8;
            return b ? "no-support" : a ? "flash" : "h5"
        },
        _playerReady: function (a) {
            this._player = a
        },
        _errorHandler: function (a) {
            console.log(a)
        },
        _loadH5Css: function () {
            var a = jQuery('<link type="text/css" rel="stylesheet" />').attr({
                id: "mini_video_css",
                href: this.H5_CSS
            });
            jQuery("head")[0].appendChild(a[0])
        }
    })
})();

function GetPix(a, c) {
    var b = c ? 'title="' + c + '"' : "";
    return "<i " + b + ' class="' + a + '"></i>'
}
var aptime = {
    hms: function (d) {
        var b = new Date(d * 1000);
        var c = b.getHours(),
            a = b.getMinutes(),
            d = b.getSeconds();
        c = c < 10 ? "0" + c : c;
        a = a < 10 ? "0" + a : a;
        d = d < 10 ? "0" + d : d;
        return c + "时" + a + "分" + d + "秒"
    },
    sToHours: function (c) {
        var b, d, a;
        a = c % 60;
        c = Math.floor(c / 60);
        a = a >= 10 ? a : "0" + a;
        d = c % 60;
        c = Math.floor(c / 60);
        d = d >= 10 ? d : "0" + d;
        b = c % 60;
        c = Math.floor(c / 60);
        b = b >= 10 ? b : "0" + b;
        if (b > 24) {
            return "23:59:59"
        } else {
            if (b < 1) {
                return d + ":" + a
            } else {
                return b + ":" + d + ":" + a
            }
        }
    },
    stoHoursEx: function (c) {
        var a = new Date((c * 1000).toString().slice(0, 13) / 1);
        var b = a.getHours();
        b = b < 10 ? "0" + b : b;
        var d = a.getMinutes();
        d = d < 10 ? "0" + d : d;
        return b + ":" + d
    },
    sToDate: function (e) {
        var b = new Date(e * 1000);
        var j = b.getFullYear();
        var a = b.getMonth() + 1;
        a = a < 10 ? "0" + a : a;
        var i = b.getDate();
        i = i < 10 ? "0" + i : i;
        var c = b.getHours();
        c = c < 10 ? "0" + c : c;
        var g = b.getMinutes();
        g = g < 10 ? "0" + g : g;
        return j + "-" + a + "-" + i + " " + c + ":" + g
    },
    sToDate2: function (e) {
        var b = new Date(e * 1000);
        var j = b.getFullYear();
        var a = b.getMonth() + 1;
        a = a < 10 ? "0" + a : a;
        var i = b.getDate();
        i = i < 10 ? "0" + i : i;
        var c = b.getHours();
        c = c < 10 ? "0" + c : c;
        var g = b.getMinutes();
        g = g < 10 ? "0" + g : g;
        return a + "-" + i + " " + c + ":" + g
    },
    sToDate3: function (d) {
        var e = d * 1000;
        var b = new Date(e);
        var c = new Date();
        var g = c.getTime() - e;
        var a = function (h) {
            if (h < 10) {
                return "0" + h
            }
            return h + ""
        };
        var f = function (k) {
            var j = b.getFullYear();
            var l = a(b.getMonth() + 1);
            var i = a(b.getDate());
            var h = a(b.getHours());
            var m = a(b.getMinutes());
            return k.replace(/y|m|d|h|i/g, function (n) {
                switch (n) {
                    case "y":
                        return j;
                    case "m":
                        return l;
                    case "d":
                        return i;
                    case "h":
                        return h;
                    case "i":
                        return m
                }
            })
        };
        if (g <= 60 * 1000) {
            return Math.max(Math.ceil(g / 1000), 1) + "秒前"
        } else {
            if (g < 60 * 60 * 1000) {
                return Math.ceil(g / 60 / 1000) + "分钟前"
            } else {
                if (g <= 24 * 60 * 60 * 1000 && c.getDate() == b.getDate()) {
                    return "今天 " + f("h:i")
                } else {
                    if (c.getFullYear() == b.getFullYear()) {
                        return f("m-d h:i")
                    } else {
                        return f("y-m-d h:i")
                    }
                }
            }
        }
    },
    sToStr: function (c) {
        var b, d, a;
        a = c % 60;
        c = Math.floor(c / 60);
        d = c % 60;
        c = Math.floor(c / 60);
        b = c % 60;
        c = Math.floor(c / 60);
        return ((b > 0 ? b + "小时" : "") + (d > 0 ? d + "分" : "") + (a > 0 ? a + "秒" : ""))
    },
    toTime: function (i, a, g, c, e, b) {
        return new Date(i, a - 1, g, c || 0, e || 0, b || 0).getTime() / 1000
    },
    tdesc: function (f, e) {
        if (isNaN(f)) {
            return f
        }
        var b = (e || new Date().getTime() / 1000) - f;
        if (b < 1) {
            return "1秒前"
        } else {
            if (b < 60) {
                return Math.ceil(b) + "秒前"
            } else {
                if (b < 3600) {
                    var a = Math.ceil(b / 60);
                    return a + "分钟前"
                } else {
                    if (b < 86400) {
                        var c = Math.ceil(b / 3600);
                        return c + "小时前"
                    } else {
                        var g = Math.ceil(b / 86400);
                        return g + "天前"
                    }
                }
            }
        }
    },
    parseTime: function (b, g) {
        var a = new Date();
        a.setTime(b * 1000);
        var e = a.getFullYear(),
            f = a.getMonth() + 1,
            f = f > 9 ? f : "0" + f,
            d = a.getDate(),
            d = d > 9 ? d : "0" + d;
        g = g ? g : "-";
        return e + g + f + g + d
    }
};

function enhtmlchars(a) {
    a = a.replace("&amp;", "&").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#039;").replace(/ /g, "&nbsp;");
    return a
}

function nl2br(a) {
    return a.replace(/(\r\n)|[\r\n]/g, "<br />")
}
String.prototype.len = function () {
    var c = this,
        a = 0;
    for (var b = 0; b < c.length; b++) {
        c.charCodeAt(b) > 255 ? (a += 2) : a++
    }
    return a
};
String.prototype.st = function (a, b) {
    if (this.length < 1 || this.length <= a) {
        return this.toString()
    }
    var g = this,
        e = [],
        d = 0;
    for (var c = 0; c < g.length; c++) {
        g.charCodeAt(c) > 255 ? (d += 2) : d++;
        if (d > a * 2) {
            break
        }
        e.push(g.charAt(c))
    }
    var f = e.join("");
    if (f == g) {
        return g
    } else {
        return b ? f.slice(0, f.length - 1) + "…" : f
    }
};
String.prototype.stripTags = function () {
    return this.replace(/<\w+(\s+("[^"]*"|'[^']*'|[^>])+)?>|<\/\w+>/gi, "")
};
String.prototype.unescapeHTML = function () {
    return this.stripTags().replace(/&lt;/g, "<").replace(/&gt;/g, ">").replace(/&amp;/g, "&").replace(/&nbsp;/gi, " ")
};
String.prototype.escapeHTML = function () {
    return this.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;")
};
String.prototype.f3 = function () {
    return this.length < 1 ? 0 : this.split("").reverse().join("").replace(/(\d{3})(?=\d)/g, "$1,").split("").reverse().join("")
};

function numF(c) {
    c = String(c);
    if (c.length < 4) {
        return c
    }
    var b = c.split("").reverse().join("");
    b = b.replace(/(\d{3})/g, "$1,");
    b = b.split("").reverse().join("");
    return b.replace(/^,/, "")
}

function insertFace(c, i) {
    if (!document.selection) {
        var k = c.selectionStart;
        var h = c.selectionEnd;
        var d = c.value;
        d = d.substr(0, k) + i + d.substr(h, d.length);
        c.value = d;
        c.selectionStart = c.selectionEnd = k + i.length;
        c.focus();
        return
    }
    c.focus();
    var f = document.selection.createRange();
    var a = c.createTextRange();
    var d = c.value;
    var j;
    var g = f.text.length;
    var l = "&^asdjfls2FFFF325%$^&";
    f.text = l;
    j = c.value.indexOf(l);
    f.moveStart("character", -l.length);
    f.text = "";
    c.value = d.substr(0, j) + i + d.substr(j + g, d.length);
    a.collapse(true);
    a.moveStart("character", j + i.length);
    a.select()
}
var FaceUrl = "//vr1.xiu123.cn/images/face/face_v2/";
var FaceSymbols = {
    "0": "/狂笑",
    "1": "/大笑",
    "2": "/惊讶",
    "3": "/害羞",
    "4": "/窃笑",
    "5": "/发怒",
    "6": "/大哭",
    "7": "/色色",
    "8": "/坏笑",
    "9": "/火大",
    "10": "/汗",
    "11": "/奸笑",
    "12": "/欢迎",
    "13": "/再见",
    "14": "/白眼",
    "15": "/挖鼻",
    "16": "/顶",
    "17": "/胜利",
    "18": "/欧耶",
    "19": "/抱拳",
    "20": "/囧",
    "21": "/淡定",
    "22": "/美女",
    "23": "/靓仔",
    "24": "/神马",
    "25": "/开心",
    "26": "/给力",
    "27": "/飞吻",
    "28": "/眨眼",
    "29": "/V5",
    "30": "/来吧",
    "31": "/围观",
    "32": "/飘过",
    "33": "/地雷",
    "34": "/菜刀",
    "35": "/帅",
    "36": "/审视",
    "37": "/无语",
    "38": "/无奈",
    "39": "/亲亲",
    "40": "/勾引",
    "41": "/后后",
    "42": "/吐血",
    "44": "/媚眼",
    "45": "/愁人",
    "46": "/肿么了",
    "47": "/调戏",
    "48": "/抽",
    "49": "/哼哼",
    "50": "/bs",
    "52": "/鸡冻",
    "53": "/眼馋",
    "54": "/热汗",
    "55": "/输",
    "56": "/石化",
    "57": "/蔑视",
    "58": "/哭",
    "59": "/骂",
    "60": "/狂哭",
    "61": "/狂汗",
    "62": "/笑哭",
    "63": "/狗狗",
    "64": "/喵喵"
};
var FaceSafe = {
    s101: "/爱你",
    s105: "/打call",
    s130: "/兄弟们上",
    s128: "/太美了",
    s125: "/我来啦",
    s104: "/比心",
    s112: "/乖",
    s102: "/拜拜啦",
    s113: "/哈哈哈哈",
    s123: "/亲你",
    s111: "/鼓掌",
    s119: "/么么哒",
    s110: "/嗯嗯",
    s109: "/屌爆了",
    s121: "/你打我啊",
    s124: "/伤心",
    s108: "/得意",
    s116: "/恐惧",
    s114: "/坏坏的笑",
    s122: "/盘它",
    s131: "/约吗",
    s120: "/摸摸头",
    s127: "/谢谢",
    s103: "/抱抱",
    s129: "/幸福",
    s117: "/抠鼻",
    s106: "/打劫",
    s107: "/打你",
    s115: "/哼",
    s118: "/浪里个浪",
    s132: "/在一起",
    s126: "/想你了"
};
var FaceVip = {
    vip1: "/真好听",
    vip2: "/嗨起来",
    vip3: "/霸气",
    vip4: "/红包刷起来",
    vip5: "/太漂亮了",
    vip6: "/马上投票",
    vip7: "/玫瑰在哪里",
    vip8: "/土豪来啦",
    vip9: "/爱死你了",
    vip10: "/啵一个",
    vip11: "/新货求关注",
    vip12: "/要抱抱",
    vip13: "/冒个泡",
    vip14: "/有黑幕",
    vip15: "/爱你1314",
    vip16: "/好甜呀",
    vip17: "/坑爹",
    vip18: "/女汉子",
    vip19: "/鼓掌",
    vip20: "/加油",
    vip21: "/天然呆",
    vip22: "/赞"
};
var FaceBirth = {
    birth1: "/生日快乐1",
    birth2: "/生日快乐2",
    birth3: "/生日快乐3",
    birth4: "/生日快乐4",
    birth5: "/生日快乐5",
    birth6: "/生日快乐6",
    birth7: "/生日快乐7",
    birth8: "/生日快乐8"
};

function ParseFaceSymobls(d, a) {
    var a = a || "2",
        b = {
            "1": FaceSafe,
            "2": FaceSymbols,
            "3": FaceVip,
            "4": FaceBirth
        } [a];
    for (var c in b) {
        d = d.replace(new RegExp(b[c], "g"), '<img align="absmiddle" src="' + this.FaceUrl + c + '.gif"/>')
    }
    return d
}

function getQueryString(b, a) {
    var c = new RegExp("(\\?|&)" + a + "=([^&]*)(&|$)", "i");
    var d = b.match(c);
    if (d != null) {
        return unescape(d[2])
    }
    return null
}

function ParseCustomTagMsg(c) {
    var b = ["sixImg", "sixLink"];
    var a = new RegExp("\\<(?:(" + b.join("|") + ")+)(.*?)\\>(.*?)(\\<\\/\\1\\>)+?", "g");
    c = ParseFaceSymobls(c).replace(a, function (j, h, g, f, e, d) {
        var l = h;
        var k = g;
        var i = f;
        switch (l) {
            case "sixImg":
                j = "<img " + k + " />";
                break;
            case "sixLink":
                j = "<a " + k + ">" + i + "</a>";
                break
        }
        return j
    });
    return c
}

function wsug(g, i, n) {
    var f = arguments.callee;
    if (!f.sug) {
        f.sug = jQuery("<div>").addClass("presSug").appendTo(document.body)
    }
    f.sug.attr("class", "presSug" + (n ? " " + n : ""));
    if (!i) {
        f.sug.css({
            visibility: "hidden",
            top: -999
        });
        jQuery(document).unbind("mousemove.sug");
        return
    }
    var l = f.sug;
    l.html(i);
    var k = l.width(),
        d = l.outerHeight(),
        a = document.documentElement.clientWidth || document.body.clientWidth;
    dh = document.documentElement.clientHeight || document.body.clientHeight;
    var m = document.documentElement.scrollTop || document.body.scrollTop,
        c = document.documentElement.scrollLeft || document.body.scrollLeft;
    var b = (g.clientX + c + 17 + k < a + c && g.clientX + c + 15) || g.clientX + c - 8 - k,
        j = (g.clientY + m + 17 + d < dh + m && g.clientY + m + 17) || g.clientY + m - 5 - d;
    l.css({
        left: b,
        top: j,
        visibility: "visible"
    });
    jQuery(document).bind("mousemove.sug", function (r) {
        var r = r || window.event,
            o = document.documentElement.scrollTop || document.body.scrollTop,
            h = document.documentElement.scrollLeft || document.body.scrollLeft;
        var q = (r.clientX + h + 17 + k < a + h && r.clientX + h + 15) || r.clientX + h - 8 - k,
            p = (r.clientY + o + 17 + d < dh + o && r.clientY + o + 17) || r.clientY + o - 5 - d;
        l.css({
            left: q,
            top: p
        })
    })
}

function createIframeBg(a) {
    var b = document.createElement("iframe");
    b.id = a.id ? a.id : "";
    b.frameborder = 0;
    b.style.position = "absolute";
    b.style.zIndex = a.zIndex ? a.zIndex : 9;
    b.style.display = "none";
    b.style.width = a.width;
    b.style.height = a.height;
    b.style.opacity = 0;
    b.style.display = "none";
    b.style.filter = "alpha(opacity=0)";
    b.style.left = a.left ? a.left : 0;
    b.style.top = a.top ? a.top : 0;
    return b
}

function getMask() {
    var g = document.createElement("div");
    g.id = "loginMask";
    g.style.background = "black";
    g.style.filter = "alpha(opacity=50)";
    g.style.opacity = 0.5;
    g.style.position = "absolute";
    g.style.zIndex = 555;
    g.style.left = 0;
    g.style.top = 0;
    var d = document.documentElement.scrollHeight,
        a = document.documentElement.scrollWidth;
    var e = screen.height,
        b = screen.width;
    var c = (d > e ? d : e) + "px";
    g.style.height = c;
    g.style.width = "100%";
    var f = createIframeBg({
        id: "loginMaskBg",
        width: "100%",
        height: c,
        zIndex: 550
    });
    document.body.appendChild(f);
    document.body.appendChild(g)
}

function getPageList(n) {
    var e = n.nextPageStr,
        c = '<img src="//vr1.xiu123.cn/imges/space.png" />';
    if (n.prevImg) {
        var f = n.prevImg,
            b = n.nextImg
    } else {
        var f = (b = c)
    }
    if (!arguments.showLink) {
        arguments.showLink = function (r, q, p) {
            return ('<a href="#" onclick="' + e + "(" + r + ');return false"' + (!p ? 'class="on"' : "") + ">" + q + "</a>")
        }
    }
    var g = Number(n.page),
        i = n.total_page;
    $block_page = n.block_page || 10;
    if (g == "" || !i) {
        return ""
    }
    var d = "";
    if (i <= 1) {
        return ""
    }
    var k = g > 1 ? '<a href="#" onclick="' + e + "(" + (g - 1) + '); return false" class="pre">' + f + "</a>" : "";
    var j = g < i ? '<a href="#" onclick="' + e + "(" + (g + 1) + '); return false" class="next">' + b + "</a>" : "";
    var a = g - Math.floor(($block_page - 1) / 2);
    var o = g + Math.floor(($block_page + 1) / 2);
    if (a < 1) {
        a = 1;
        o = $block_page <= i ? $block_page : i
    } else {
        if (o > i) {
            o = i;
            a = i - $block_page >= 0 ? i - $block_page + 1 : 1
        }
    }
    var l = "";
    for (var m = a; m <= o; m++) {
        l += arguments.showLink(m, m, m == g ? false : true)
    }
    var h = "";
    if (o < i) {
        h = "<b>...</b>"
    }
    var d = k + l + h + j;
    return d
}
var modnickname;
(function (a) {
    modnickname = {
        sendApi: "/user/aliasname.php",
        initialize: function () {
            var b = a("#userPanel_index")[0] ? " nickname-index" : "";
            this.box = a("<div/>", {
                "class": "nickname" + b,
                html: "载入中...",
                mouseover: a.proxy(this.yvisible, this),
                mouseout: a.proxy(this.yhidden, this)
            }).appendTo(document.body);
            this.boxInit()
        },
        boxInit: function () {
            this.box.html('<div class="arrow"><i class="i1">◆</i><i class="i2">◆</i></div><div class="box"><p class="editeUser">用户名：' + _puser.username + '</p><p class="editeNick">我的昵称：<strong>' + _puser.nickname + '</strong></p><p class="editeInput">修改昵称：<input type="text" id="nNickname" alt="3至10个字符" /><span class="editeBtn"><button type="button" id="nNicknameBtn">确定</button></span></p><p class="editeNick">我的签名：<strong>' + (_puser.mood || "暂无") + '</strong></p><p class="editeInput">修改签名：<input type="text" id="moodName"  alt="最多10个字符"/><span class="editeBtn"><button type="button" id="moodNameBtn">确定</button></span></p><p class="eidteInfo"><strong>*</strong>拥有VIP可在房间公聊区显示签名</p></div>');
            this.nNickname = a("#nNickname");
            this.nNicknameBtn = a("#nNicknameBtn");
            this.nNicknameBtn.bind("click", a.proxy(this.send, this));
            this.moodName = a("#moodName");
            this.moodNameBtn = a("#moodNameBtn");
            this.moodNameBtn.on("click", a.proxy(this, "sendMood"));
            a.each(this.box.find("input"), function () {
                var b = a(this);
                var c = b.attr("alt");
                b.val(c);
                b.on("focus blur", function (d) {
                    if (d.type == "focus") {
                        b.addClass("focus");
                        if (b.val() == c) {
                            b.val("")
                        }
                    } else {
                        if (b.val() == "") {
                            b.removeClass("focus");
                            b.val(c)
                        }
                    }
                })
            })
        },
        t_v: 0,
        yvisible: function (b) {
            if (!this.box) {
                this.initialize()
            }
            clearTimeout(this.t_v);
            if (this.vis) {
                return
            }
            this.t_v = setTimeout(a.proxy(this.visible, this, b), 200)
        },
        yhidden: function () {
            clearTimeout(this.t_v);
            if (this.vis) {
                this.t_v = setTimeout(a.proxy(this.iHidden, this), 50)
            }
        },
        btn: 0,
        visible: function (d) {
            var e = a(d),
                c = e.offset().left + 3;
            e.addClass("change-name-on");
            this.btn = e;
            var b = e.offset();
            this.box.css({
                left: b.left + e.width() - 254,
                top: Math.max(24, b.top + e.height() - 10)
            }).addClass("nickname-open");
            this.vis = 1
        },
        iHidden: function () {
            this.box.removeClass("nickname-open");
            this.vis = 0;
            this.btn.removeClass("change-name-on")
        },
        callback: function (d) {
            var c = function () {};
            var b = function () {
                window.location.href = window.location.href.replace(/#.*$/, "")
            };
            if (d.flag == "001") {
                Prompt.alert(d.content, b)
            } else {
                if (d.flag == "406") {
                    if (window.BindMobile) {
                        window.BindMobile.init();
                        return
                    }
                    Prompt.create({
                        content: "您当前未绑定手机，请您先绑定手机!",
                        btn_sure: {
                            text: "去绑定",
                            link: "/user/userinfo/uinfo.php?step=phone",
                            target: "_blank"
                        },
                        btn_cancel: {
                            text: "以后再说"
                        }
                    })
                } else {
                    Prompt.alert(d.content, c)
                }
            }
        },
        send: function () {
            var b = a.trim(this.nNickname.val());
            var c = this.nNickname.attr("alt");
            if (b == "" || b == c) {
                Prompt.alert("请输入昵称！");
                return
            }
            this.nNickname.val("");
            this.yhidden();
            a.getJSON(this.sendApi, {
                act: "p",
                alias: b
            }, this.callback)
        },
        sendMood: function () {
            var c = a.trim(this.moodName.val());
            var b = this.moodName.attr("alt");
            if (!_puser.mood) {
                if (!c || c == b) {
                    Prompt.alert("请输入签名！");
                    return
                }
                this.moodName.val("");
                this.yhidden()
            }
            a.getJSON("/user/setUserMood.php", {
                mood: c == b ? "" : c
            }, this.callback)
        }
    }
})(jQuery);
(function (a) {
    var b = '<div class="nickname-tip">				<i class="arrow"></i>				<div class="box">					<a class="close" title="关闭"></a>					<div class="txt">好的昵称可以引起主播的关注</div>					<div class="cur">当前昵称：<em>{alias}</em></div>					<div class="edit">						<input class="name" type="text" placeholder="3至10个字符">						<a class="btn-rand">随机</a>					</div>					<div class="send" data-tracing="rand_alias_count"><a class="btn-send">确认修改</a></div>				</div>			</div>';
    window.nicknameTip = {
        init: function (g) {
            var d = this;
            var e = (this.box = a(b.replace("{alias}", _puser.nickname)).appendTo(document.body));
            var f = e.find("input.name");
            this.visible();
            f.on("focus blur", function (i) {
                if (i.type == "focus") {
                    a(this).attr("placeholder", "")
                } else {
                    a(this).attr("placeholder", "3至10个字符")
                }
            });
            var h = 0;
            var c = g.length;
            e.find("a").on("click", function (j) {
                var i = a(this);
                if (i.hasClass("close")) {
                    e.remove()
                } else {
                    if (i.hasClass("btn-rand")) {
                        if (c < 1) {
                            Prompt.alert("系统暂时想不起什么亮眼昵称了!");
                            return
                        }
                        f.val(g[h]);
                        h++;
                        if (h >= c) {
                            h = 0
                        }
                    } else {
                        d.send(i)
                    }
                }
            })
        },
        visible: function () {
            var e = this.box;
            var d = a("#changename");
            var c = d.offset();
            e.css({
                left: c.left + d.width() - 200,
                top: Math.max(24, c.top + d.height() - 10)
            });
            setTimeout(function () {
                e.addClass("nickname-tip-show")
            }, 500)
        },
        send: function (d) {
            var e = this.box;
            var f = e.find("input.name");
            var c = f.val();
            if (!c) {
                Prompt.alert("请输入昵称！");
                return
            }
            if (d.hasClass("disabled")) {
                return
            }
            d.addClass("disabled");
            a.getJSON("/user/aliasname.php", {
                act: "p",
                alias: c
            }, function (i) {
                d.removeClass("disabled");
                var h = function () {};
                var g = function () {
                    window.location.href = window.location.href.replace(/#.*$/, "")
                };
                if (i.flag == "001") {
                    e.remove();
                    Prompt.alert(i.content, g)
                } else {
                    if (i.flag == "406") {
                        e.remove();
                        if (window.BindMobile) {
                            window.BindMobile.init();
                            return
                        }
                        Prompt.create({
                            content: "您当前未绑定手机，请您先绑定手机!",
                            btn_sure: {
                                text: "去绑定",
                                link: "/user/userinfo/uinfo.php?step=phone",
                                target: "_blank"
                            },
                            btn_cancel: {
                                text: "以后再说"
                            }
                        })
                    } else {
                        Prompt.alert(i.content, h)
                    }
                }
            })
        }
    };
    setTimeout(function () {
        if (_puser.uname_tip) {
            a.getJSON("/user/getRandAlias.php?pc=1", function (c) {
                if (c.flag == "001") {
                    nicknameTip.init(c.content.list)
                }
            })
        }
    }, 3000)
})(jQuery);
var getCoinPop;
(function (a) {
    getCoinPop = {
        initialize: function () {
            var b = window.page && page.tpl == "voice2018" ? "&ruid=" + page.rid : "";
            var d = a("#userPanel_index")[0] ? " getcoin-pop-index" : "";
            var c = '<div class="arrow"><i class="i1">◆</i><i class="i2">◆</i></div>				<div class="box">				<p id="coin"><i></i>六币:<em class="num">' + numF(_puser._6b) + '</em><a class="btn" href="/user/payshow.php?i=1' + b + '" target="_blank" data-tracing="ipvafi3p">充值</a></p>				<p id="coin6"><i></i>六豆:<em class="num">' + numF(_puser._6d) + '</em><a class="btn" href="/user/exchange.php" target="_blank" data-tracing="ipvafi3q">兑换</a></p>				</div>';
            this.box = a("<div/>", {
                "class": "getcoin-pop" + d,
                html: c,
                mouseover: this.yvisible,
                mouseout: this.yhidden
            }).appendTo(document.body)
        },
        t_v: 0,
        yvisible: function (c) {
            var b = getCoinPop;
            if (!b.box) {
                b.initialize();
                a(c).on("mouseout", b.yhidden)
            }
            clearTimeout(b.t_v);
            if (b.vis) {
                return
            }
            b.t_v = setTimeout(function () {
                b.visible(c)
            }, 200)
        },
        yhidden: function () {
            var b = getCoinPop;
            clearTimeout(b.t_v);
            if (b.vis) {
                b.t_v = setTimeout(b.iHidden, 50)
            }
        },
        btn: 0,
        visible: function (d) {
            var c = getCoinPop,
                e = a(d);
            c.btn = e;
            c.box.find("#coin .num").html(numF(_puser._6b));
            c.box.find("#coin6 .num").html(numF(_puser._6d));
            c.btn.addClass("my-coin-on");
            var b = e.offset();
            c.box.css({
                left: b.left + e.width() - 90,
                top: Math.max(24, b.top + e.height() - 10)
            }).addClass("getcoin-pop-open");
            c.vis = 1
        },
        iHidden: function () {
            var b = getCoinPop;
            b.box.removeClass("getcoin-pop-open");
            b.vis = 0;
            b.btn.removeClass("my-coin-on")
        }
    }
})(jQuery);
var setCloaking;
(function (a) {
    setCloaking = {
        sendApi: "/user/prop/listPriv.php",
        initialize: function () {
            this.cloaking = a("#cloaking a:eq(0)");
            var b = a("#userPanel_index")[0] ? " cloaking-box-index" : "";
            this.box = a("<div/>", {
                "class": "cloaking-box" + b,
                html: '<div class="arrow"><i class="i1">◆</i><i class="i2">◆</i></div><div class="box setCloaking"><div id="setCloaking"><a class="setOnline" data-tracing="ipvafi3s"><span></span>在线</a><a class="setOffline" data-tracing="ipvafi3t"><span></span>隐身</a></div></div>',
                mouseover: this.yvisible,
                mouseout: this.yhidden
            }).appendTo(document.body);
            a("#setCloaking").find("a.setOffline, a.setOnline").bind("click", this.send)
        },
        t_v: 0,
        yvisible: function (b) {
            var c = setCloaking;
            if (!c.box) {
                c.initialize();
                a(b).bind("mouseout", c.yhidden)
            }
            clearTimeout(c.t_v);
            if (c.vis) {
                return
            }
            c.t_v = setTimeout(function () {
                c.visible(b)
            }, 200)
        },
        yhidden: function () {
            var b = setCloaking;
            clearTimeout(b.t_v);
            if (b.vis) {
                b.t_v = setTimeout(b.iHidden, 50)
            }
        },
        btn: 0,
        visible: function (c) {
            var e = setCloaking,
                d = a(c);
            e.btn = d;
            e.btn.parents("li").addClass("cloaking-on");
            var b = d.offset();
            e.box.css({
                left: b.left + d.innerWidth() - 61,
                top: Math.max(24, b.top + d.innerHeight() - 10)
            }).addClass("cloaking-box-open");
            e.vis = 1
        },
        iHidden: function () {
            var b = setCloaking;
            b.box.removeClass("cloaking-box-open");
            b.vis = 0;
            b.btn.parents("li").removeClass("cloaking-on")
        },
        callback: function (d) {
            if (d.flag == "001") {
                _puser.cloaking = setCloaking.cloaking.hasClass("offline") ? 0 : 1;
                var b = _puser.cloaking ? "隐身" : "在线";
                var c = _puser.cloaking ? "offline" : "online";
                setCloaking.cloaking.find("span").html(b);
                setCloaking.cloaking.attr("class", c);
                setCloaking.cloaking.attr("title", "当前" + b)
            } else {
                Prompt.alert(d.content)
            }
        },
        send: function (b) {
            b.preventDefault();
            var f = setCloaking;
            f.yhidden();
            var c = a(this).hasClass("setOffline") ? 1 : 0;
            var e = setCloaking.cloaking.hasClass("offline");
            if ((e && c) || (!e && !c)) {
                return
            }
            var d = {
                act: "p",
                priv: 7,
                status: c
            };
            a.getJSON(setCloaking.sendApi, d, setCloaking.callback)
        }
    }
})(jQuery);
var GeetestPassport = function (b, a) {
    a = a || {};
    this._wrap = b;
    this._challenge = a.challenge || "";
    this._offline = !a.success;
    this._geetest = null;
    this._callback = [];
    this._callbackname = "geetest_" + String.uniqueID();
    this._sdkReady = jQuery.proxy(this, "_sdkReady");
    this._loadSdk();
    this.init()
};
GeetestPassport.prototype = {
    init: function () {
        if (typeof Geetest != "undefined" && this._challenge) {
            var b = (this._geetest = new Geetest({
                gt: "6afb5fbb4998793df3c0a75732dedbdc",
                challenge: this._challenge,
                product: "float",
                offline: this._offline,
                sandbox: false
            }));
            var c = this._callback;
            if (c.length > 0) {
                for (var a = 0; a < c.length; a++) {
                    b[c[a][0]] && b[c[a][0]](c[a][1])
                }
            }
            this._wrap.empty();
            b.appendTo(this._wrap[0])
        }
    },
    destroy: function () {
        this._wrap.empty();
        this._geetest = this._callback = window[this._callbackname] = this._wrap = null
    },
    getCode: function () {
        return this._geetest.getValidate()
    },
    on: function (a, b) {
        if (this._geetest) {
            this._geetest[a] && this._geetest[a](b)
        } else {
            this._callback.push([a, b])
        }
    },
    refresh: function () {
        this._geetest.refresh()
    },
    _loadSdk: function () {
        if (typeof Geetest == "undefined") {
            var a = document.createElement("script");
            var b = "https://api.geetest.com/get.php?callback=" + this._callbackname;
            window[this._callbackname] = this._sdkReady;
            a.src = b;
            document.getElementsByTagName("head")[0].appendChild(a)
        }
    },
    _sdkReady: function () {
        if (this._challenge && !this._geetest) {
            this.init()
        }
    }
};
var GeetestV6CN = function (a) {
    this._wrap = a;
    this._callback = {};
    this._completeHandler = jQuery.proxy(this, "_completeHandler");
    this.init()
};
GeetestV6CN.prototype = {
    init: function () {
        var b = "https://api.geetest.com/get.php?gt=1b477861ca5ce50507d0ed393c602173";
        var a = document.createElement("script");
        window.gt_custom_ajax = this._completeHandler;
        a.src = b;
        this._wrap.html("");
        this._wrap[0].appendChild(a)
    },
    destroy: function () {
        this._wrap.empty();
        this._wrap = this._callback = window.gt_custom_ajax = null
    },
    getCode: function () {
        var b = this._wrap;
        var c = b.find("input[name=geetest_challenge]").val();
        var d = b.find("input[name=geetest_validate]").val();
        var a = b.find("input[name=geetest_seccode]").val();
        return {
            geetest_challenge: c,
            geetest_validate: d,
            geetest_seccode: a
        }
    },
    on: function (a, b) {
        this._callback[a] = b
    },
    refresh: function () {
        var a = this._wrap.find(".gt_refresh_button");
        a.each(function (b, c) {
            c && c.click()
        })
    },
    _completeHandler: function (a) {
        if (a == 1) {
            this._callback.onSuccess && this._callback.onSuccess()
        } else {
            this._callback.onError && this._callback.onError()
        }
    }
};
var SM_fingerprints = {
    timeoutTimer: null,
    init: function (a) {
        if (typeof SMSdk == "undefined") {
            window._smConf = {
                organization: "TKWQ4vmgC3PJLGDTMIoJ",
                staticHost: "static.portal101.cn",
                originHost: "static2.fengkongcloud.com",
                isOpenUserBehavior: true
            }
        }
        this._loadSdk(a)
    },
    getDeviceId: function (b) {
        var a = window.SMSdk ? encodeURIComponent(window.SMSdk.getDeviceId()) : "";
        if (a == "") {
            this._tongji()
        }
        return a
    },
    _hackIE: function () {
        var b = navigator.userAgent.toLowerCase();
        var d = "https:" === document.location.protocol;
        var a = /windows\s(?:nt\s5.1)|(?:xp)/.test(b);
        var c = /msie\s[678]\.0/.test(b);
        return d && a && c
    },
    _loadSdk: function (c) {
        var a = this;
        var b = "https://" + window._smConf[this._hackIE() ? "originHost" : "staticHost"] + "/dist/web/v2.0.0/fp.min.js";
        clearTimeout(a.timeoutTimer);
        $LAB.setOptions({
            cors: true
        }).script(b).wait(function () {
            clearTimeout(a.timeoutTimer);
            if (typeof c == "function") {
                setTimeout(c, 600)
            }
        });
        if (typeof c == "function") {
            a.timeoutTimer = setTimeout(c, 4 * 1000)
        }
    },
    _tongji: function () {
        new Image().src = "https://sclick.6rooms.com/w.html?&act=33&ua=&deviceid="
    }
};
var V6SMCaptcha = function (b, a) {
    this._id = b;
    this._wrap = jQuery("#" + b);
    this._config = a || {};
    this._smCaptcha = null;
    this._callback = [];
    this._sdkReady = jQuery.proxy(this, "_sdkReady");
    this._loadSdk()
};
V6SMCaptcha.prototype = {
    on: function (a, b) {
        if (this._smCaptcha) {
            this._smCaptcha[a] && this._smCaptcha[a](b)
        } else {
            this._callback.push([a, b])
        }
    },
    getCode: function () {
        var a = this._smCaptcha.getResult();
        return a.rid && a.pass ? a : null
    },
    getSdk: function () {
        return this._smCaptcha
    },
    refresh: function () {
        this._smCaptcha.reset()
    },
    destroy: function () {
        this._wrap.empty();
        this._smCaptcha = this._id = this._callback = this._wrap = null
    },
    _loadSdk: function () {
        var a = this;
        var b = jQuery.extend({
            https: location.host.indexOf("dev") > -1 ? false : true,
            organization: "TKWQ4vmgC3PJLGDTMIoJ",
            appendTo: a._id,
            product: "float"
        }, this._config);
        if (typeof initSMCaptcha == "undefined") {
            $LAB.setOptions({
                cors: true
            }).script(JSF.smcp).wait(function () {
                initSMCaptcha(b, a._sdkReady)
            })
        } else {
            setTimeout(function () {
                initSMCaptcha(b, a._sdkReady)
            }, 0)
        }
    },
    _sdkReady: function (a) {
        if (!this._smCaptcha) {
            this._smCaptcha = a;
            var c = this._callback;
            if (c.length > 0) {
                for (var b = 0; b < c.length; b++) {
                    this._smCaptcha[c[b][0]] && this._smCaptcha[c[b][0]](c[b][1])
                }
            }
        }
    }
};
var loginFast;
(function () {
    var a = jQuery;
    loginFast = {
        _module: "",
        ie6: a.browser.msie && a.browser.version == "6.0",
        domain: _domain,
        getNextAction: function (d) {
            var c = d || location.href;
            var b = c.split("#");
            if (location.host.indexOf("dev.v.6.cn") > -1 && c.indexOf("pagereferrer=login") < 0) {
                b[0] = (b[0].indexOf("?") > -1 ? "&" : "?") + "pagereferrer=login"
            }
            return encodeURIComponent(b.join("#"))
        },
        getTracing: function (b) {
            return ("&page=" + encodeURIComponent(pageMessage._page || "") + "&pageid=" + encodeURIComponent(pageMessage._pageid || "") + "&uuid=" + encodeURIComponent(pageMessage._uuid || "") + "&module=" + encodeURIComponent(b || loginFast._module || "noname") + "&from_module=" + encodeURIComponent(pageMessage._tracing || "") + "&from_pageid=" + encodeURIComponent(pageMessage._from_pageid || "") + "&from_recid=" + encodeURIComponent(pageMessage._from_recid || "") + "&from_liveid=" + encodeURIComponent(pageMessage._from_liveid || "") + "&from_recSrc=" + encodeURIComponent(pageMessage._from_recSrc || "") + "&watchid=" + encodeURIComponent(pageMessage._watchid || "") + "&reft=" + encodeURIComponent(pageMessage._reft || "") + "&pagecode=index&platform=" + encodeURIComponent(pageMessage._platform || "") + "&ver=" + encodeURIComponent(pageMessage._ver || "") + "&tracing=" + encodeURIComponent(pageMessage._tracing || ""))
        },
        getTracing2: function (c) {
            var b = (pageMessage._tracing || "") + "," + (pageMessage._from_pageid || "") + "," + (pageMessage._page || "") + "," + (c || loginFast._module || "noname") + "," + (pageMessage._pageid || "") + ",index," + (pageMessage._watchid || "") + "," + (pageMessage._platform || "") + "," + (pageMessage._uuid || "") + "," + (pageMessage._reft || "") + "," + (pageMessage._ver || "") + "," + (pageMessage._from_recid || "") + "," + (pageMessage._from_liveid || "") + "," + (pageMessage._from_recSrc || "");
            return encodeURIComponent(b)
        },
        getQQlink: function (c, b) {
            var e = loginFast.getNextAction(b);
            var d = loginFast.getTracing(c || "");
            return ("//v.6.cn/coopapi/partner/accredit.php?taye=1047&next_action=" + e + d)
        },
        weixin_login: {
            callback: null,
            appid: null,
            state: null,
            init: function () {
                this._loadWeixin(a("#loginwithWeixin"))
            },
            _loadWeixin: function (b) {
                $LAB.script(JSF.weixin).wait(function () {
                    a.ajax({
                        type: "post",
                        dataType: "json",
                        url: "/coopapi/partner/accredit.php?taye=1073&json=1&next_action=" + loginFast.getNextAction(loginFast._nextAction) + loginFast.getTracing(),
                        success: function (c) {
                            this.callback = c.content.callback;
                            this.appid = c.content.appid;
                            this.state = c.content.state;
                            var d = new WxLogin({
                                id: "weixin_wrap",
                                appid: this.appid,
                                scope: "snsapi_login",
                                redirect_uri: this.callback,
                                state: this.state,
                                style: "",
                                href: "https://vj0.xiu123.cn/mini/css/base/weixin_login.css"
                            });
                            a("#weixin_base").css("display", "block")
                        }
                    })
                });
                collectEvent("login_click", {
                    login_type: "微信"
                })
            },
            clear: function () {
                a("#weixin_base").css("display", "none");
                a("#weixin_wrap").find("iframe").remove()
            }
        },
        quick_login: {
            quickHtmlStr: function () {
                return ('<div class="overFrameContent fix">                <form class="mobile-quick" id="mobile_quick_form">                    <dl><dd class="mq-number">                    <label><em><i></i></em></label>                    <div class="input"><input name="phone" type="text" class="focus" placeholder="手机号码，仅支持大陆手机" /><span class="user-placeholder">手机号码，仅支持大陆手机</span></div></dd>                    <dd class="mq-code"><label><em><i></i></em></label>                    <div class="mobile-code">                    <div class="input fix"><input name="code" type="text" class="focus" placeholder="短信验证码" /><span class="user-placeholder">短信验证码</span><a class="get-code disabled">获取短信验证码</a></div>                    </div></dd>                    <dd class="fix" id="member-quick-picsig-field" style="display:none;">                    <label class="l2"><span>验证码</span><em><i></i></em></label>                    <div class="input fix">                    <div id="geetest_quick" style="width:312px;float:left;"></div>                    <div class="remind"><span id="geetest_quick_reload">看不到验证码？<a style="cursor:pointer">点击刷新</a></span></div>                    </div>                </dd>                    <dd class="user-select">                    <div class="protocol fix">                    <a class="checked_focus" onclick="if(this.className==\'unchecked_focus\'){this.className=\'checked_focus\'; jQuery(\'#time_check\')[0].checked=true}else{this.className=\'unchecked_focus\'; jQuery(\'#time_check\')[0].checked=false}"><i></i>30天内自动登录</a>                    <input type="checkbox" checked="checked" id="time_check" style="display:none" class="nobstyle"  />                    </div></dd>                    <dt class="loginbtn">                    <input type="submit" value="立即登录" class="loogerbtn">                    </dt></dl>' + loginFast.LR.agrreement + "</form>            </div>")
            },
            isGetCode: 0,
            init: function (h) {
                this.next_url = h || "";
                var j = a("#loginBox").find(".mobile-quick"),
                    o = j.find(".mq-number input"),
                    k = j.find(".mq-number label em"),
                    e = j.find("a.get-code"),
                    l = j.find(".mq-code input"),
                    n = j.find(".mq-code label em"),
                    c = j.find(".loogerbtn"),
                    d = this;
                var i = null;
                var p = true;
                o.on("blur", function () {
                    var q = d.checkFun.mobile(o);
                    if (q) {
                        e.removeClass("disabled")
                    } else {
                        e.addClass("disabled")
                    }
                });
                e.click(function () {
                    if (a(this).hasClass("disabled")) {
                        return
                    }
                    var r = a(this);
                    if (d.checkFun.mobile(o)) {
                        var q = o.val(),
                            s = {
                                act: "smslogin",
                                prod: 20000,
                                mobile: q
                            };
                        if (p) {
                            if (!i) {
                                return b()
                            }
                            if (!i.getCode()) {
                                return alert("请滑动验证")
                            }
                            a.extend(s, i.getCode())
                        }
                        a.extend(s, {
                            deviceId: SM_fingerprints.getDeviceId()
                        });
                        r.addClass("disabled");
                        a.getJSON("//" + document.domain + "/auth/getAuthCode.php", s, function (t) {
                            if (t.flag == "001") {
                                d.countDown(r, 60);
                                d.error(o, t.content, 1)
                            } else {
                                alert(t.content);
                                r.removeClass("disabled");
                                i && i.refresh()
                            }
                        })
                    } else {
                        alert("请输入正确的手机号")
                    }
                });
                var g = function (q, t) {
                    var s = a("#geetest_quick");
                    i && i.destroy();
                    i = null;
                    var r = function (u, v) {
                        s.off().on("mouseenter mouseleave", function (w) {
                            var x = a(this).find(u);
                            x[w.type == "mouseenter" ? "addClass" : "removeClass"](v)
                        });
                        s.trigger("mouseenter")
                    };
                    if (q == 1) {
                        i = new GeetestPassport(a("#geetest_quick"), t);
                        i.on("onReady", function () {
                            r(".gt_widget", "gt_show")
                        });
                        i.on("onSuccess", function () {
                            f()
                        })
                    } else {
                        a("#geetest_quick").css({
                            position: "relative",
                            zIndex: 4
                        });
                        i = new V6SMCaptcha("geetest_quick", {
                            width: 300
                        });
                        i.on("onReady", function () {
                            r(".shumei_captcha_img_wrapper", "shumei_show")
                        });
                        i.on("onSuccess", function (u) {
                            if (u.pass) {
                                f()
                            }
                        })
                    }
                    a("#member-quick-picsig-field").css("display", "block")
                };
                var f = function () {
                    e.click();
                    a("#member-quick-picsig-field").css("display", "none");
                    i && i.destroy();
                    i = null
                };
                var b = function () {
                    a.getJSON("//" + document.domain + "/auth/getVerifyCodeType.php").done(function (q) {
                        if (q.flag == "001") {
                            if (q.content > 0) {
                                p = true;
                                if (q.content == 1) {
                                    a.getJSON("/getGeeGt.php?prod=20000", function (r) {
                                        if (r.flag == "001") {
                                            g(q.content, r.content)
                                        } else {
                                            alert(r.content)
                                        }
                                    })
                                } else {
                                    g(q.content)
                                }
                            } else {
                                p = false;
                                f()
                            }
                        } else {
                            alert(q.content)
                        }
                    })
                };
                window.quickLoginCallback = function (q) {
                    if (q.retcode == 0) {
                        if (d.next_url) {
                            location.href = d.next_url
                        } else {
                            if (location.href.indexOf("logins.php") > -1) {
                                location.href = "/"
                            } else {
                                location.reload(true)
                            }
                        }
                    } else {
                        loginFast.enableForm();
                        e.removeClass("disabled");
                        if (q.retcode == -5000) {
                            alert(q.content)
                        } else {
                            alert(SSOController.getErrorMsg(q.retcode))
                        }
                    }
                };
                var m = function () {
                    var q = o.val(),
                        t = l.val(),
                        s = a("#time_check")[0].checked.toString();
                    var r = SSOController.createForm("/auth/smsLogin.php", "mobileQuickLogin", "POST", "emptyIframe");
                    var u = {
                        format: "pc",
                        act: "nor",
                        code: t,
                        mobile: q,
                        savestate: s,
                        deviceid: SM_fingerprints.getDeviceId(),
                        next_action: d.next_url || window.location.href,
                        p1: location.host + location.pathname + location.search,
                        p3: loginFast.getTracing2()
                    };
                    if (window.paramEncodeWithPad) {
                        u = paramEncodeWithPad(u, ["code", "mobile"])
                    }
                    SSOController.addInput(r, u);
                    r.submit();
                    collectEvent("beconEvent", "login_click", {
                        login_type: "手机号"
                    })
                };
                c.on("click", function (q) {
                    q.preventDefault();
                    if (a(this).hasClass("loogerbtn-disabled")) {
                        return
                    }
                    if (!d.checkFun.mobile(o) || !d.checkFun.code(l)) {
                        alert("请填写完整表单再提交！");
                        return false
                    }
                    if (i && !i.getCode()) {
                        alert("请滑动验证");
                        loginFast.enableForm();
                        return false
                    }
                    loginFast.disableForm();
                    m()
                })
            },
            checkFun: {
                mobile: function (b) {
                    var e = a(b).val(),
                        d = loginFast.quick_login;
                    if (!e) {
                        d.error(b, "请填写手机号");
                        return false
                    }
                    var c = /^1\d{10}$/;
                    if (!c.test(e)) {
                        d.error(b, "请填入正确的手机号");
                        return false
                    }
                    d.error(b);
                    return true
                },
                code: function (b) {
                    var e = a(b).val(),
                        d = loginFast.quick_login;
                    if (!e) {
                        d.error(b, "请填写验证码");
                        return false
                    }
                    var c = /^\d{6}$/;
                    if (!c.test(e)) {
                        d.error(b, "请填入6位数字的验证码");
                        return false
                    }
                    d.error(b);
                    return true
                }
            },
            error: function (c, f, e) {
                var b = a(c).parents("dd");
                var d = b.find("label em");
                if (e) {
                    d.removeClass();
                    d.html(f);
                    return
                }
                if (f) {
                    var f = "<i></i>" + f;
                    d.removeClass().addClass("invalid");
                    d.html(f);
                    c.css("borderColor", "red")
                } else {
                    d.addClass("valid").removeClass("invalid");
                    d.html("<i></i>OK");
                    c.css("borderColor", "")
                }
            },
            countDown: function (f, b) {
                var e = f,
                    d = b,
                    c = this;
                if (!d) {
                    e.html("获取验证码");
                    e.removeClass("disabled")
                } else {
                    d--;
                    e.html("重新获取(" + d + ")");
                    setTimeout(function () {
                        c.countDown(e, d)
                    }, 1000)
                }
            }
        },
        LR: {
            event_pic: '<img src="https://v.6.cn/loginBorderImage.php" alt=""/>',
            event_link: "<a></a>",
            footer: "</div>",
            header: function () {
                return '<div class="loginMask_box"></div><div class="loginMask">            <em class="close" onclick="loginFast.cancel()" title="关闭"  data-tracing="closeLoginBox">关闭</em>                    <div class="login-quick">                        <a class="quick" data-tracing="mobile_login_btn"><span class="animate-bounce-down">手机号一键登录<i></i></span></a>                        <a class="normal"><span class="animate-bounce-down">用户名密码登录<i></i></span></a>                    </div>                    <div class="login-quick-nav"><a href="javascript:;" class="on">手机号登录</a><i class="underline"></i></div>                    <div class="login-nav" id="loginNav">                        <a href="javascript:;" class="login-btn">登录</a>                        <a href="javascript:;" class="reg-btn">注册</a>                        <i class="underline"></i>                    </div>'
            },
            partnerHtml: function () {
                var b = loginFast.preset_username || "";
                var c = encodeURIComponent(location.href.indexOf("logins") > -1 ? "//v.6.cn" : location.href);
                return ('<div id="weixin_base"><a href="#" class="weixin_close" onClick="loginFast.weixin_login.clear();return false;"><返回</a><div style="margin:-18px 56px 0;" id="weixin_wrap"></div></div>        			<div class="side">                    <span class="title"><i class="l"></i><i class="r"></i>第三方账号登录</span><span class="partner">                    <a href="/auth/wxLogin.php?bgurl=' + c + '" onclick="loginFast.weixin_login.init(); return false" class="loginWith loginWith-weixin" id="loginwithWeixin"  title="使用微信账号登录" data-tracing="wx_login_btn"><i class="icon"></i><em class="bg"></em></a>                    <a href="//v.6.cn/coopapi/partner/accredit.php?taye=1047&next_action=' + loginFast.getNextAction(loginFast._nextAction) + loginFast.getTracing() + '" class="loginWith loginWith-qq" title="使用QQ登录" data-tracing="qq_login_btn"><i class="icon"></i><em class="bg"></em></a>                    <a href="//v.6.cn/coopapi/partner/accredit.php?taye=1003&next_action=' + loginFast.getNextAction(loginFast._nextAction) + loginFast.getTracing() + '" class="loginWith loginWith-sina" title="使用微博登录"><i class="icon"></i><em class="bg"></em></a></span>                    <div class="login_event_link" id="login_event_link">' + loginFast.LR.event_link + "</div>                    </div>")
            },
            agrreement: '<div style="width:302px; margin-top:10px; text-align:center">登录即同意<a href="https://v.6.cn/about.php?ac=agreement" target="_blank" class="txt">《用户协议》</a>和<a href="https://v.6.cn/about.php?ac=privacy" target="_blank" class="txt">《用户隐私政策》</a><br/>用户协议已更新 请点击查看</div>',
            loginHtmlstr: function () {
                var b = loginFast.preset_username || "";
                var c = encodeURIComponent(location.href.indexOf("logins") > -1 ? "//v.6.cn" : location.href);
                return ('<div class="overFrameContent fix">                    <div class="vlogin">                    <form method="post" class="LRFrame_quick" name="loginFrame_quick" id="loginFrame_quick" action="https://6.cn/login.php">                    <input type="hidden" value="login" name="action"><input type="hidden" value="live" name="from_act"><input type="hidden" value="' + loginFast.domain + '/uloginTwo.php" name="url">                    <dl>                    <dd class="ddusr fix">                    <label><em><i></i></em></label>                    <div class="input"><input type="text" name="username" class="focus" value="' + b + '" id="member-login-un" placeholder="用户名"><span class="user-placeholder">用户名</span></div>                    </dd>                    <dd class="ddpsw fix">                    <label><em><i></i></em></label>                    <div class="input"><input type="password" name="passwd" class="focus"  id="member-login-pd" placeholder="密码"><span class="user-placeholder">密码</span></div>                    <div class="cap"><span class="arrow"><i class="i1">◆</i><i class="i2">◆</i></span>Caps Lock键处于启用状态，请注意区分大小写。</div>                    </dd>                    <dd class="fix" id="member-login-picsig-field" style="display:none;">                    <label><span>验证码</span><em><i></i></em></label>                    <div class="input" >                    <div id="geetest_login" class="fix" style="margin-bottom:5px;"></div>                    <div class="forget"><span id="geetest_login_reload" style="color:#999;padding:0;">看不到验证码？<a style="cursor:pointer;color:#fd3000">点击刷新</a></span></div>                    </div>                    </dd>                    <dd class="user-select">                    <div class="protocol fix">                    <a class="checked_focus" onclick="if(this.className==\'unchecked_focus\'){this.className=\'checked_focus\'; jQuery(\'#cookie_check\')[0].checked=true}else{this.className=\'unchecked_focus\'; jQuery(\'#cookie_check\')[0].checked=false}"><i></i>30天内自动登录</a>                    <input type="checkbox" checked="checked" id="cookie_check" style="display:none" class="nobstyle"  />                    </div>                    <div class="forget"><a class="forget" href="' + _toDomain + '/user/userinfo/losepass.php" target="_blank" tabindex="9999">忘记密码</a><span class="forget">|</span>                    <a class="forget" href="' + _toDomain + '/user/userinfo/losename.php" target="_blank" tabindex="9999">忘记用户名</a></div>                    </dd>                    <dt class="loginbtn">                    <input type="submit" value="立即登录" class="loogerbtn">					</dt></dl>					</form>' + loginFast.LR.agrreement + "</div>" + loginFast.LR.partnerHtml() + "</div>")
            },
            regHtmlstr: function () {
                return ('<div class="overFrameContent fix">                    <div class="vreg">                    <form  method="post" id="regFrame_quick" name="reg_form" class="LRFrame_quick"  action="https://6.cn/reg.php">                    <input name="email" value="abc@6.cn" type="hidden" id="member-signup-email"  /><input type="hidden" value="reg" name="action"><input type="hidden" value="live" name="from_act"><input type="hidden" value="' + loginFast.domain + '/uloginTwo.php" name="url">                    <dl class="reg-type"></dl>                    <dl>                    <dd class="protocol fix">                    <a class="unchecked_focus" onclick="if(this.className==\'unchecked_focus\'){this.className=\'checked_focus\'; jQuery(\'#login-agree\')[0].checked=true}else{this.className=\'unchecked_focus\'; jQuery(\'#login-agree\')[0].checked=false}"><i></i>我已阅读并同意</a>                    <input type="checkbox" class="nobstyle" style="display:none"  value="checkbox" id="login-agree" name="agree">                      <a href="https://v.6.cn/about.php?ac=agreement" target="_blank" class="txt">《用户协议》</a>                     <a href="https://v.6.cn/about.php?ac=privacy" target="_blank" class="txt">《用户隐私政策》</a>                    </dd>                    <dt>                    <input name="submitreg" type="submit" value="提交注册" class="regbtn">                    </dt></dl></form></div>                    </div>')
            },
            mobileHeader: function () {
                return '<div class="loginMask_box"></div><div class="loginMask">'
            },
            mobileHtmlStr: function (b) {
                return ('<em class="close" title="关闭" onclick="loginFast.cancel()" data-tracing="closeLoginBox">关闭</em>            		<div class="mobelBox">                    <h5 class="mobelTit">手机密保验证<i class="underline"></i></h5>                    <p class="info">由于本账号登录状态异常，为确保账户安全，请进行手机密保验证。<br />验证成功前，您的账号将暂时无法使用。</p>                    <p class="mBtn" id="mobelGetCode"><button>获取验证码</button><span class="callInfo">验证码每天最多获取5次</span></p>                    <p class="mBtn" id="mobelPutCode"><input class="focus" type="text" value="填写收到的6位验证码" /><button>提交验证</button><span class="callInfo error">验证码输入有误，您还可以重试7次</span></p>                    <p class="warn">如1分钟内您的手机没有收到验证码，您可以重新发送验证码，验证码在首次发送后15分钟内有效</p>' + (b ? '<p class="warn">您的用户名是<strong>' + b + "</strong>，如果您的手机无法接收验证码，请联系客服</p>" : "") + "</div>")
            }
        },
        set_pos: function () {
            var b = a("#loginBox");
            b.css({
                marginTop: "-260px",
                top: "50%",
                opacity: 1,
                transform: "translate(0, 0)"
            })
        },
        create_box: function (b, c) {
            this.cancel();
            Mask.create();
            this.box = a("<div/>", {
                id: "loginBox",
                "class": c ? "loginBox" : "loginBox loginBox290",
                style: "position:fixed; left:50%; top:100px; z-index:99999",
                "data-tracing": "loginBox",
                html: b
            }).appendTo(document.body);
            setTimeout(this.set_pos, 100)
        },
        isShowReg: null,
        checkReg: function (c, b, e) {
            var d = this;
            a.getJSON("/user/showMobileReg.php", function (f) {
                if (f.flag == "001") {
                    d.isShowReg = f.content / 1
                } else {
                    d.isShowReg = 1
                }
                d.login(c, b, e)
            })
        },
        login: function (d, c, f) {
            if (location.host == "6.cn") {
                this.isShowReg = 1
            }
            if (this.isShowReg == null) {
                this.checkReg(d, c, f);
                return
            } else {
                if (this.isShowReg == 0) {
                    if (d == 1) {
                        d = 0
                    }
                }
            }
            var b = this;
            this._passwordHandler = a.proxy(this._passwordHandler, this);
            this._nextAction = c || "";
            this._module = f || "";
            this.create_box(this.LR.header() + '<div style="margin-top:60px; text-align:center;">加载中...</div>' + this.LR.footer, d);
            if (this.isShowReg == 0) {
                this.box.addClass("loginBox-hideReg")
            }
            var e = this.box;
            $LAB.script(JSF.sso).wait(function () {
                var g = 0;
                var i = d == 1 ? b.LR.regHtmlstr() : b.LR.loginHtmlstr();
                e.html(b.LR.header() + i + b.LR.footer);
                if (d == 1) {
                    e.find(".login-nav i.underline").css({
                        left: "74px"
                    });
                    e.addClass("regBox").find(".reg-btn").addClass("on");
                    b.initReg()
                } else {
                    if (d == 2) {
                        g = 1
                    } else {
                        e.find(".login-btn").addClass("on");
                        b.initLogin()
                    }
                }
                SM_fingerprints.init();
                b.inputFocus();
                var h = e.find(".login-nav a");
                h.on("click", function () {
                    var l = 0;
                    a(this).addClass("on").siblings().removeClass("on");
                    if (a(this).hasClass("login-btn")) {
                        l = 0;
                        e.find(".login-nav i.underline").animate({
                            left: 0
                        }, 300);
                        e.removeClass("regBox");
                        e.addClass("loginBox290")
                    } else {
                        l = 1;
                        e.find(".login-nav i.underline").animate({
                            left: 74
                        }, 300);
                        e.addClass("regBox");
                        e.removeClass("loginBox290")
                    }
                    var k = l == 1 ? b.LR.regHtmlstr() : b.LR.loginHtmlstr();
                    e.find(".overFrameContent").eq(0).html(k);
                    if (l == 1) {
                        b.initReg()
                    } else {
                        b.initLogin()
                    }
                    b.inputFocus();
                    window.__coopLoginCallback && __coopLoginCallback()
                });
                var j = e.find(".login-quick a");
                j.on("click", function () {
                    if (a(this).hasClass("quick")) {
                        e.find(".login-nav").css("display", "none");
                        e.find(".login-quick-nav").css("display", "block");
                        var k = b.quick_login.quickHtmlStr() + b.LR.partnerHtml();
                        e.find(".overFrameContent").eq(0).html(k);
                        b.quick_login.init(b._nextAction);
                        b.inputFocus()
                    } else {
                        e.find(".login-nav").css("display", "block");
                        e.find(".login-quick-nav").css("display", "none");
                        h.filter(".login-btn").click()
                    }
                    a(this).css("display", "none").siblings().css("display", "inline-block")
                });
                if (g) {
                    j.filter("a.quick").trigger("click")
                }
                if (d == 3) {
                    loginFast.weixin_login.init()
                }
                window.__coopLoginCallback && __coopLoginCallback()
            });
            return false
        },
        mobile: function (g, d, f) {
            var h = this,
                e = 60,
                g = g;
            this.create_box(this.LR.mobileHeader() + h.LR.mobileHtmlStr(d) + this.LR.footer);
            var c = function (l, k) {
                var l = l,
                    k = k;
                if (!k) {
                    l.html("获取验证码");
                    l.removeClass("disabled");
                    l.prop("disabled", false)
                } else {
                    k--;
                    l.html("(" + k + "秒后)重新获取");
                    setTimeout(function () {
                        c(l, k)
                    }, 1000)
                }
            };
            var j = a("#mobelGetCode button"),
                b = a("#mobelPutCode button"),
                i = a("#mobelPutCode input");
            j.bind("click", function () {
                j.prop("disabled", true);
                a.getJSON("//" + document.domain + "/auth/getAuthCode.php", {
                    act: "login",
                    ticket: g
                }, function (k) {
                    if (k.flag == "001") {
                        c(j, 60);
                        j.addClass("disabled");
                        a("#mobelGetCode span:eq(0)").html(k.content)
                    } else {
                        alert(k.content);
                        j.prop("disabled", false)
                    }
                })
            });
            i.bind("focus", function () {
                if (i.val() == "填写收到的6位验证码") {
                    i.val("")
                }
                i.css("color", "#333")
            });
            b.bind("click", function () {
                if (isNaN(i.val()) || i.val().length != 6) {
                    a("#mobelPutCode span:eq(0)").html("<i></i>请输入正确的6位数字验证码");
                    a("#mobelPutCode span").css("visibility", "visible");
                    i.focus();
                    return false
                }
                b.prop("disabled", true);
                window.__auth_loginCheckError = function (n) {
                    a("#mobelPutCode span:eq(0)").html("");
                    alert(n.content);
                    b.prop("disabled", false)
                };
                var l = window.location.search;
                var k = /(?:\?|\&)prod\=(\d+)\&?/.exec(l);
                var m = SSOController.createForm("/auth/loginCheck.php?autologin=1", "loginCheck", "POST", "emptyIframe");
                SSOController.addInput(m, {
                    code: i.val(),
                    ticket: g,
                    prod: k ? k[1] : f || ""
                });
                m.submit()
            })
        },
        cancel: function () {
            if (!a("#loginBox")[0]) {
                return
            }
            Mask.remove();
            a("#loginBox").remove();
            loginFast._module = ""
        },
        initReg: function () {
            try {
                new Image().src = "https://sclick.6rooms.com/w.html?act=10"
            } catch (l) {}
            var n = this;
            var f = null;
            var b = a("#regFrame_quick");
            var o = true;
            var d = function (p, e) {
                var p = p,
                    e = e;
                if (!e) {
                    p.html("获取验证码");
                    p.removeClass("disabled")
                } else {
                    e--;
                    p.html("重新获取(" + e + ")");
                    setTimeout(function () {
                        d(p, e)
                    }, 1000)
                }
            };
            (function () {
                var q = '<dd class="mobile-num fix">                <label class="l1"><em><i></i></em></label>                <div class="input">                <div class="select-box">                <select id="member-signup-country">                    <option data-code="86" data-attern="^(86-){0,1}1\\d{10}$" value="1">中国</option>                </select>                </div>                <div class="input-box">                    <span class="code">+<i id="member-signup-code">86</i></span>                    <span class="user-placeholder">手机号码</span>                    <input type="text" id="member-signup-mobile" placeholder="手机号码" class="focus" maxlength="15" name="phone">                </div>                <a class="get-mcode disabled">获取验证码</a>                </dd>                <dd class="fix" id="member-register-picsig-field" style="display:none;">                <label class="l2"><span>验证码</span><em><i></i></em></label>                <div class="input fix">                <div id="geetest_reg" style="width:312px;float:left;"></div>                <div class="remind"><span id="geetest_reg_reload">看不到验证码？<a style="cursor:pointer">点击刷新</a></span></div>                </div>                </dd>                <dd class="login-mobile-code fix">                <label class="l1"><em><i></i></em></label>                <div class="input"><input type="text" id="member-signup-mcode" placeholder="手机验证码" maxlength="6" class="focus" name="mcode">                <span class="user-placeholder">手机验证码</span></div>                </dd>';
                var t = '<dd class="fix">                    <label class="l1"><em><i></i></em></label>                    <div class="input"><input type="text" id="member-signup-un" placeholder="用户名注册后不可更改" class="focus" maxlength="15" name="username">                    <span class="user-placeholder">用户名注册后不可更改</span></div>                    </dd><dd class="ddpsw fix">                    <label><em><i></i></em></label>                    <div class="input"><input type="password" id="member-signup-pw" placeholder="密码区分大小写" name="passwd" class="focus">                    <span  class="user-placeholder">密码区分大小写</span></div>                    <div class="cap"><span class="arrow"><i class="i1">◆</i><i class="i2">◆</i></span>Caps Lock键处于启用状态，请注意区分大小写。</div>                    </dd>                    <dd class="fix">                    <label class="l1"><em><i></i></em></label>                    <div class="input"><input type="password" id="member-signup-pwag" placeholder="密码确认" class="focus" name="passwd2">                    <span class="user-placeholder">密码确认</span>                    </div>                    </dd>';
                var s = a("#loginBox"),
                    r = s.find(".reg-type");
                r.html(t + q);
                r.on("click", "a.get-mcode", function (z) {
                    z.preventDefault();
                    var x = a(this);
                    if (x.hasClass("disabled")) {
                        return
                    }
                    var u = j["member-signup-mobile"]();
                    if (u) {
                        var y = a("#member-signup-mobile").val();
                        var w = a("#member-signup-code").text();
                        var v = w + "-" + y;
                        var A = {
                            act: "user_register",
                            prod: 20000,
                            mobile: v
                        };
                        if (o) {
                            if (!f) {
                                return c()
                            }
                            if (!f.getCode()) {
                                return alert("请滑动验证")
                            }
                            a.extend(A, f.getCode())
                        }
                        a.extend(A, {
                            deviceId: SM_fingerprints.getDeviceId()
                        });
                        x.addClass("disabled");
                        a.getJSON("//" + document.domain + "/auth/getAuthCode.php", A, function (B) {
                            if (B.flag == "001") {
                                d(x, 60);
                                m(a("#member-signup-mobile"), B.content, 1)
                            } else {
                                alert(B.content);
                                x.removeClass("disabled");
                                f && f.refresh()
                            }
                        })
                    }
                });
                var e = a("#member-signup-country");
                var p = a("#member-signup-code");
                e.on("change", function (v) {
                    var w = a(this).find("option:selected");
                    var u = w.attr("data-code");
                    p.text(u)
                });
                a.getJSON("/user/getInternationCode.php").done(function (v) {
                    if (v.flag == "001") {
                        var u = [];
                        a.each(v.content, function (x, w) {
                            var y = x == "86" ? "selected" : "";
                            a.each(w, function (z, A) {
                                u.push("<option " + y + ' data-code="' + x + '" data-attern="' + A.pattern + '" value="' + x + '">' + A.title + "</option>")
                            })
                        });
                        e.html(u.join(""))
                    }
                })
            })();
            var j = {
                "member-signup-un": function () {
                    var e = a("#member-signup-un");
                    var p = a.trim(e.val());
                    var q = {
                        name: function () {
                            var r = /^[\da-z\u4E00-\u9FA5]+$/i;
                            if (p.length < 2) {
                                m(e, "用户名不符合规范");
                                return false
                            }
                            if (!r.test(p)) {
                                m(e, "您的用户名包含了特殊字符，不能注册。用户名仅允许使用中文、英文和数字");
                                return false
                            }
                            return true
                        }
                    };
                    if (p == "") {
                        return
                    }
                    if (!q.name()) {
                        return false
                    }
                    if (e[0].last && e[0].last == p) {
                        return e[0].status
                    }
                    e[0].last = p;
                    m(e, "检测重名...", 1);
                    SSOController.checkUsername(p, function (s, r) {
                        if (s) {
                            m(e);
                            e[0].status = true;
                            b.find("a.get-mcode").removeClass("disabled")
                        } else {
                            m(e, "用户名已被占用");
                            e[0].status = false;
                            b.find("a.get-mcode").addClass("disabled")
                        }
                    });
                    return false
                },
                "member-signup-pw": function () {
                    var p = a("#member-signup-pw");
                    var q = p.val();
                    if (q == "") {
                        return
                    }
                    var e = n.checkPassWord(q);
                    if (!e.ret) {
                        m(p, e.errorMsg);
                        return
                    }
                    m(p);
                    return true
                },
                "member-signup-pwag": function () {
                    var e = a("#member-signup-pwag");
                    var p = e.val();
                    var q = a("#member-signup-pw").val();
                    if (p == "") {
                        return
                    }
                    if (p != q) {
                        m(e, "两次密码不一致");
                        return false
                    }
                    m(e);
                    return true
                },
                "member-signup-mobile": function () {
                    var e = a("#member-signup-mobile");
                    var r = e.val();
                    if (r == "") {
                        return
                    }
                    var s = a("#member-signup-country option:selected");
                    var p = s.attr("data-attern");
                    var q = s.attr("data-code");
                    if (!new RegExp(p).test(q + "-" + r)) {
                        m(e, "请输入正确的手机号");
                        return false
                    }
                    m(e);
                    return true
                },
                "member-signup-mcode": function () {
                    if (!a("#member-signup-mcode")[0]) {
                        return true
                    }
                    var e = a("#member-signup-mcode");
                    var p = e.val();
                    if (p == "") {
                        return
                    }
                    var q = /^\d{6}$/;
                    if (!q.test(p)) {
                        m(e, "请输入正确的6位数字验证码");
                        return false
                    }
                    m(e);
                    return true
                },
                "login-agree": function () {
                    var e = a("#login-agree");
                    if (!e[0].checked) {
                        alert("未同意六间房使用协议");
                        return false
                    }
                    return true
                }
            };
            var m = function (p, s, r) {
                var e = a(p).parents("dd");
                var q = e.find("em");
                if (r) {
                    q.removeClass("invalid").removeClass("valid");
                    q.html(s);
                    return
                }
                if (s) {
                    var s = "<i></i>" + s;
                    q.addClass("invalid").removeClass("valid");
                    q.html(s);
                    p.css("borderColor", "red")
                } else {
                    q.addClass("valid").removeClass("invalid");
                    q.html("<i></i>OK");
                    p.css("borderColor", "")
                }
            };
            var k = function (p) {
                if (this.next_url) {
                    location.href = this.next_url;
                    return
                }
                try {
                    if (window.top.location.href.indexOf("logins.php") > -1) {
                        window.top.location = "/"
                    } else {
                        window.top.location.reload(true)
                    }
                } catch (q) {
                    window.location.reload(true)
                }
            };
            var h = function (e) {
                n.enableForm();
                f && f.refresh();
                alert(SSOController.getErrorMsg(e.retcode))
            };
            var i = function (e, p) {
                f && f.destroy();
                f = null;
                if (e == 1) {
                    f = new GeetestPassport(a("#geetest_reg"), p);
                    f.on("onSuccess", function () {
                        g()
                    })
                } else {
                    a("#geetest_reg").css({
                        position: "relative",
                        zIndex: 4
                    });
                    f = new V6SMCaptcha("geetest_reg", {
                        width: 300
                    });
                    f.on("onSuccess", function (q) {
                        if (q.pass) {
                            g()
                        }
                    })
                }
                a("#member-register-picsig-field").css("display", "block")
            };
            var g = function () {
                b.find("a.get-mcode").trigger("click");
                a("#member-register-picsig-field").css("display", "none");
                f && f.destroy();
                f = null
            };
            var c = function () {
                a.getJSON("//" + document.domain + "/auth/getVerifyCodeType.php").done(function (e) {
                    if (e.flag == "001") {
                        if (e.content > 0) {
                            o = true;
                            if (e.content == 1) {
                                a.getJSON("/getGeeGt.php?prod=20000", function (p) {
                                    if (p.flag == "001") {
                                        i(e.content, p.content)
                                    } else {
                                        alert(p.content)
                                    }
                                })
                            } else {
                                i(e.content)
                            }
                        } else {
                            o = false;
                            g()
                        }
                    } else {
                        alert(e.content)
                    }
                })
            };
            b.on("blur", "input.focus", function (p) {
                var e = p.target;
                var q = e.id;
                j[q] && j[q]()
            });
            b.bind("submit", function (p) {
                p.preventDefault();
                try {
                    new Image().src = "https://sclick.6rooms.com/w.html?act=11"
                } catch (w) {}
                var x = false;
                a.each(j, function (C, e) {
                    if (typeof e == "function") {
                        return !!(x = e())
                    }
                });
                if (x) {
                    var u = a("#member-signup-un").val();
                    var B = a("#member-signup-pw").val();
                    var s = a("#member-signup-pwag").val();
                    var r = a("#member-signup-code").text();
                    var q = a("#member-signup-mobile").val();
                    var v = r + "-" + q;
                    var z = a("#member-signup-mcode").val();
                    var y = "abc@6.cn";
                    var t = document.domain;
                    if (u == "" || B == "" || s == "") {
                        alert("请填写完整表单再提交");
                        return
                    }
                    var A = function () {
                        var e = {
                            username: u,
                            password: B,
                            password2: B,
                            phone: v,
                            code: z,
                            email: y,
                            domain: t,
                            agree: "checkbox",
                            p1: location.host + location.pathname + location.search,
                            p3: loginFast.getTracing2(),
                            deviceId: SM_fingerprints.getDeviceId()
                        };
                        SSOController.register(e, {
                            appRegisterURL: "//" + window.location.host + "/login_test.php",
                            domain: document.domain,
                            success: k,
                            error: h
                        });
                        n.disableForm()
                    };
                    A();
                    collectEvent("beconEvent", "register_click", {
                        regist_type: "用户名"
                    })
                }
            });
            a("#member-signup-pw").bind("keypress", this._passwordHandler);
            a("#member-signup-pw").bind("blur", this.hidCap);
            a("#geetest_reg_reload").on("click", function () {
                if (f) {
                    f.refresh()
                } else {
                    c()
                }
            })
        },
        initLogin: function () {
            var c = a("#loginFrame_quick");
            var j = this;
            var g = window.location.host;
            var k = null;
            var m = true;
            var l = function (o) {
                if (location.host.indexOf("dev.v.6.cn") > -1) {
                    var n = this.next_url || location.href;
                    if (n.indexOf("logins.php") > -1) {
                        n = location.origin
                    }
                    location.href = decodeURIComponent(loginFast.getNextAction(n))
                } else {
                    if (this.next_url) {
                        location.href = this.next_url;
                        return
                    }
                    if (location.href.indexOf("logins.php") > -1) {
                        location.href = "/"
                    } else {
                        location.reload(true)
                    }
                }
            };
            var i = function (n) {
                if (n.retcode == "-1111") {
                    j.mobile(n.ticket, "", n.prod);
                    return false
                }
                d(n.username);
                alert(SSOController.getErrorMsg(n.retcode));
                j.enableForm()
            };
            var b = function (o, n) {
                SSOController.preloginUsername = {};
                SSOController.needVerify(o, function (q, r) {
                    var p = r.verifycode || Number(r.vc);
                    if (!!p) {
                        m = true;
                        h(p, r.gt)
                    } else {
                        m = false;
                        f()
                    }
                    n && n()
                })
            };
            var h = function (n, q) {
                var r = a("#member-login-picsig-field");
                var p = a("#geetest_login");
                r.css("display", "block");
                k && k.destroy();
                k = null;
                var o = function (s, t) {
                    p.off().on("mouseenter mouseleave", function (u) {
                        var v = a(this).find(s);
                        v[u.type == "mouseenter" ? "addClass" : "removeClass"](t)
                    });
                    p.trigger("mouseenter")
                };
                if (n == 1) {
                    k = new GeetestPassport(p, q);
                    k.on("onReady", function () {
                        o(".gt_widget", "gt_show")
                    })
                } else {
                    if (n == 2) {
                        p.css({
                            position: "relative",
                            zIndex: 4
                        });
                        k = new V6SMCaptcha("geetest_login", {
                            width: 300
                        });
                        k.on("onReady", function () {
                            o(".shumei_captcha_img_wrapper", "shumei_show")
                        })
                    }
                }
            };
            var f = function () {
                a("#member-login-picsig-field").css("display", "none")
            };
            var d = function (n) {
                b(n || String.uniqueID())
            };
            var e = function () {
                var q = a("#member-login-un").val();
                var o = a("#member-login-pd").val();
                var p = a("#cookie_check")[0].checked;
                var n = function () {
                    SSOController.config({
                        extraParameter: jQuery.extend({}, m ? k.getCode() : {}, {
                            deviceId: SM_fingerprints.getDeviceId()
                        })
                    });
                    SSOController.login(q, o, p ? "1" : "0");
                    collectEvent("beconEvent", "login_click", {
                        login_type: "用户名"
                    })
                };
                if (!q || !o) {
                    alert("请输入用户名和密码");
                    j.enableForm();
                    return
                }
                if (k) {
                    if (!k.getCode()) {
                        alert("请滑动验证");
                        j.enableForm();
                        return
                    }
                    n()
                } else {
                    b(q, function () {
                        if (!m) {
                            n()
                        } else {
                            j.enableForm()
                        }
                    })
                }
            };
            SSOController.config({
                domain: g,
                appLoginURL: "//" + window.location.host + "/login_test.php",
                success: l,
                error: i,
                next_url: this._nextAction,
                p1: location.host + location.pathname + location.search,
                p3: loginFast.getTracing2()
            });
            a("#member-login-pd").bind("keypress", this._passwordHandler);
            a("#member-login-pd").bind("blur", this.hidCap);
            a("#geetest_login_reload a").on("click", function (n) {
                n.preventDefault();
                d(a("#member-login-un").val())
            });
            c.bind("submit", function (n) {
                n.preventDefault();
                j.disableForm();
                e()
            })
        },
        checkPassWord: function (d) {
            var b = false;
            var c = /^(?=.*[a-z])(?=.*\d).{8,20}$/i;
            if (c.test(d)) {
                b = true
            }
            return {
                ret: b,
                errorMsg: "密码长度需8到20位，且必须包含数字和字母"
            }
        },
        checkCapsLock: function (f) {
            var e = f.which || f.keyCode;
            var g = String.fromCharCode(e);
            var d = f.shiftKey;
            var b = false;
            if (g.toUpperCase() === g && g.toLowerCase() !== g && !d) {
                b = true
            }
            return b
        },
        hidCap: function () {
            var b = a("#loginBox div.cap");
            if (!b[0]) {
                return
            }
            b.css("display", "none")
        },
        _passwordHandler: function (b) {
            var c = a("#loginBox div.cap");
            if (!c[0]) {
                return
            }
            if (this.checkCapsLock(b)) {
                c.css("display", "block")
            } else {
                c.css("display", "none")
            }
        },
        disableForm: function () {
            this._formState(true)
        },
        enableForm: function () {
            this._formState(false)
        },
        _formState: function (b) {
            var e = a("#regFrame_quick");
            var f = a("#loginFrame_quick");
            var d = a("#mobile_quick_form");
            var c;
            if (e[0]) {
                e.find("input").prop("disabled", b);
                c = e.find(".regbtn");
                if (b) {
                    c.val("正在提交...");
                    c.addClass("regbtn-disabled")
                } else {
                    c.val("提交");
                    c.removeClass("regbtn-disabled")
                }
            }
            if (f[0]) {
                f.find("input").prop("disabled", b);
                c = f.find(".loogerbtn");
                if (b) {
                    c.val("正在登录...");
                    c.addClass("loogerbtn-disabled")
                } else {
                    c.val("登录");
                    c.removeClass("loogerbtn-disabled")
                }
            }
            if (d[0]) {
                d.find("input").prop("disabled", b);
                c = d.find(".loogerbtn");
                if (b) {
                    c.val("正在登录...");
                    c.addClass("loogerbtn-disabled")
                } else {
                    c.val("登录");
                    c.removeClass("loogerbtn-disabled")
                }
            }
        },
        inputFocus: function () {
            a.each(a("#loginBox").find("form input.focus"), function (d, c) {
                var b = a(this);
                var f = b.attr("placeholder");
                if (f && !("placeholder" in document.createElement("input"))) {
                    var e = b.parent().find("span.user-placeholder");
                    e.css("display", "block");
                    b.on("focus", function () {
                        e.css("display", "none")
                    }).on("blur", function () {
                        if (b.val()) {
                            return
                        }
                        e.css("display", "block")
                    })
                }
            })
        },
        loginOutUrl: function (i) {
            var f = window.location.host.indexOf("dev.") > -1 ? "v.6.cn" : document.domain;
            var g = getCookie("ticket_v");
            var b = (g && g.slice(-5)) || "";
            var d = (i || location.href).replace(/#.*$/, "");
            var h = a.getUrlParams(d);
            delete h.pagereferrer;
            var e = a.serialize(h);
            d = d.split("?")[0] + (e ? "?" : "") + e;
            var c = "//passport.6.cn/sso/logout.php?domain=" + f + "&prod=" + b + "&url=" + encodeURIComponent("//" + location.host + "/logout_test.php") + "&next_action=" + encodeURIComponent(d);
            return c
        }
    }
})();
(function (b) {
    window.getDataTracing = function (f) {
        var d = b(f)[0];
        var g = "noname";
        while (d && d.parentNode) {
            var e = d.getAttribute("data-tracing");
            if (e) {
                g = e;
                d = null
            } else {
                if (d.tagName.toLowerCase() == "body") {
                    d = null
                } else {
                    d = d.parentNode
                }
            }
        }
        return g
    };
    window.zhangZhiParam = function (d) {
        var e = {
            module: d || "noname",
            uuid: pageMessage._uuid || "",
            page: pageMessage._page || "",
            pageid: pageMessage._pageid || "",
            from_module: pageMessage._tracing || "",
            from_pageid: pageMessage._from_pageid || "",
            from_recid: pageMessage._from_recid || "",
            from_liveid: pageMessage._from_liveid || "",
            from_recSrc: pageMessage._from_recSrc || "",
            liveid: pageMessage._liveid || 0,
            watchid: pageMessage._watchid || "",
            platform: pageMessage._platform || "web",
            reft: pageMessage._reft || "",
            ver: pageMessage._ver || ""
        };
        return e
    };
    var c = 0;
    var a = function (e) {
        var f = [];
        for (var d in e) {
            if (e.hasOwnProperty(d)) {
                f.push(encodeURIComponent(d) + "=" + encodeURIComponent(e[d]))
            }
        }
        return f.join("&")
    };
    window.toZhangZhi = function (i, f, g) {
        if (!pageMessage._ver) {
            if (c < 10) {
                setTimeout(function () {
                    c++;
                    toZhangZhi(i, f, g)
                }, 1000)
            }
        } else {
            if (pageMessage._isCrawler) {
                return
            }
            var e = window.screen.width + "/" + window.screen.height;
            var d = typeof pageMessage == "object" && pageMessage.user && pageMessage.user.uid ? '{"uid":' + pageMessage.user.uid + ',"coinrank":' + pageMessage.user.rich + ',"newcoinrank":' + pageMessage.user.new_rich + ',"wealthrank":' + pageMessage.user.star + "}" : "";
            var h = "";
            if (window.PAGE_ENV && PAGE_ENV.puid) {
                h = PAGE_ENV.puid
            } else {
                if (window.page && page.puid) {
                    h = page.puid
                }
            }
            var j = {
                event: i,
                module: f || "noname",
                uuid: pageMessage._uuid || "",
                page: pageMessage._page || "",
                pageid: pageMessage._pageid || "",
                rid: h,
                data: d,
                recid: window.ZHANG_ZHI_RECID || "",
                from_module: pageMessage._tracing || "",
                from_pageid: pageMessage._from_pageid || "",
                from_recid: pageMessage._from_recid || "",
                from_liveid: pageMessage._from_liveid || "",
                from_recSrc: pageMessage._from_recSrc || "",
                liveid: pageMessage._liveid || 0,
                watchid: pageMessage._watchid || "",
                reft: pageMessage._reft || "",
                platform: pageMessage._platform || "web",
                ver: pageMessage._ver || ""
            };
            g = g || {};
            b.extend(j, g);
            if (i == "in") {
                b.extend(j, {
                    topageid: g.topageid || "",
                    url: g.url || ""
                })
            }
            if (i == "load") {
                b.extend(j, {
                    resolution: e,
                    url: g.url || "",
                    reffer: document.referrer
                })
            }
            if (i == "showbtn") {
                b.extend(j, {
                    url: g.url || ""
                })
            }
            new Image().src = "//sclick.6rooms.com/s.html?" + a(j)
        }
    }
})(jQuery);

function tab_change(c, a, d) {
    var c = jQuery(c),
        b = [],
        a = a || "rel",
        d = d || "on";
    c.each(function (e) {
        b.push(jQuery(this).attr(a));
        jQuery(this).bind("click", function (f) {
            f.preventDefault();
            jQuery(b).css("display", "none");
            jQuery("#" + jQuery(this).attr(a)).css("display", "block");
            c.removeClass(d);
            jQuery(this).addClass(d)
        })
    });
    b = "#" + b.join(",#")
}

function scriptLoad(b, d) {
    var a = document.createElement("script");
    var c = document.getElementsByTagName("head")[0];
    a.type = "text/javascript";
    a.src = b;
    a.onload = a.onreadystatechange = function () {
        if (!this.readyState || this.readyState == "complate" || this.readyState == "loaded") {
            d && d();
            a.onload = a.onreadystatechange = null
        }
    };
    c.appendChild(a)
}

function iframeLoad(a, b) {
    var c = document.createElement("iframe");
    c.style.position = "absolute";
    c.style.left = "-9999px";
    c.style.top = "-9999px";
    c.src = a;
    document.body.appendChild(c);
    if (document.attachEvent) {
        c.onreadystatechange = function () {
            if (c.readyState == "4" || c.readyState == "loaded" || c.readyState == "complete") {
                b();
                c.parentNode.removeChild(c)
            }
        }
    } else {
        c.onload = function () {
            b();
            c.parentNode.removeChild(c)
        }
    }
}
var ControlCenter;
(function () {
    var a = jQuery;
    ControlCenter = function () {
        this.initialize.apply(this, arguments)
    };
    a.extend(ControlCenter.prototype, {
        toDomain: _toDomain,
        vis: 0,
        delay: 2000,
        t: null,
        is_init: 0,
        btn: null,
        initialize: function (b) {
            var c = a(b.centerBtn);
            c.bind("mouseover", a.proxy(this.yvisible, this, c)).bind("mouseout", a.proxy(this.yhidden, this));
            var d = a("#changename");
            d.bind({
                mouseover: a.proxy(modnickname.yvisible, modnickname, d),
                mouseout: a.proxy(modnickname.yhidden, modnickname)
            })
        },
        boxInit: function () {
            var d = _puser.rid ? _toDomain + "/" + _puser.rid : "#",
                f = _puser.uid ? _toDomain + "/profile/index.php?rid=" + _puser.rid : "#";
            var b = getRichIcon({
                coin6rank: _puser.rich,
                fid: _puser.uid,
                coin6pic: _puser.coin6pic,
                newCoin6rank: _puser.new_rich,
                newCoin6pic: _puser.newCoin6pic
            });
            var e = a("#userPanel_index")[0] ? " ucontrol-pop-index" : "";
            var g = window.page && page.rid > 0 ? page.rid : 0;
            var c = '<div class="arrow"><i class="i1"></i><i class="i2"></i></div>				<div class="pop-inner fix">				<div class="logout" data-tracing="ipvafi3w">' + Login.logoutHtml + '</div>				<div class="uinfo">				<div class="pic">				<a class="avatar" href="' + d + '" data-tracing="ipvafi3u" target="_blank"><img src="' + _puser.pic + '"></a>				<a class="upload" onclick="userSet.visible();" title="更换头像" data-tracing="ipvafi3z"><i></i></a>				</div>				<div class="name"><a href="' + d + '" data-tracing="ipvafi3u" target="_blank">' + _puser.nickname + "</a><span>(" + _puser.rid + ')</span></div>				<div class="level"><span><em>主播：</em><i class="star' + _puser.star + '"></i></span><span><em>富豪：</em>' + b + '</span>	</div>				</div>				<div class="control"><ul class="fix">				<li class="u-room"><a href="' + d + '" target="_blank" data-tracing="ipvafi3y"><i></i>直播房间</a></li>				<li class="u-home"><a href="' + f + '" target="_blank" data-tracing="ipvafi3x"><i></i>个人主页</a></li>				<li class="u-shop"><a href="' + _toDomain + "/user/payshow.php?i=1&ruid=" + g + '" target="_blank" data-tracing="ipvafi4d"><i></i>充值商城</a></li>				<li class="u-cash"><a href="' + _toDomain + '/user/exchange.php#t31" target="_blank" data-tracing="ipvafi4e"><i></i>兑换六币</a></li>				<li class="u-family"><a href="' + _toDomain + '/user/listFamily.php" target="_blank" data-tracing="ipvafi43"><i></i>我的家族</a></li>				<li class="u-group"><a href="' + _toDomain + '/user/imNew/group.php" target="_blank" data-tracing="ipvafi2g"><i></i>我的群聊</a></li>				<li class="u-friend"><a href="' + _toDomain + '/user/im/list.php" target="_blank" data-tracing="ipvafi45"><i></i>我的好友</a></li>				<li class="u-manage"><a href="' + _toDomain + '/user/roomadmin.php" target="_blank" data-tracing="ipvafi46"><i></i>我的房管</a></li>				<li class="u-fans"><a href="' + _toDomain + '/user/fans.php" target="_blank" data-tracing="ipvafi47"><i></i>粉丝守护</a></li>				<li class="u-follow"><a href="' + _toDomain + '/user/favorite.php" target="_blank" data-tracing="ipvafi48"><i></i>关注的人</a></li>				<li class="u-prop"><a href="' + _toDomain + '/user/prop/list.php?act=com" target="_blank" data-tracing="ipvafi4a"><i></i>我的道具</a></li>				<li class="u-dress"><a href="' + _toDomain + '/user/myDress/index.php?act=badge" target="_blank" data-tracing="ipvafi49"><i></i>我的装扮</a></li>				<li class="u-game"><a href="' + _toDomain + '/user/mygame.php" target="_blank" data-tracing="ipvafi4c"><i></i>我的游戏</a></li>				<li class="u-bill"><a href="' + _toDomain + '/user/detail.php" target="_blank" data-tracing="ipvafi4b"><i></i>来往账单</a></li>				</ul></div>				<div class="ulink">				<a class="to-pw" href="' + _toDomain + '/user/userinfo/uinfo.php?step=safe" target="edit" data-tracing="ipvafi40">修改密码</a>				<a class="to-safe" href="' + _toDomain + '/user/userinfo/uinfo.php?step=phone" target="edit" data-tracing="ipvafi41">设置密保</a>				<a class="to-help" href="' + _toDomain + '/help.php" target="_blank" data-tracing="cscHelp"><i></i>帮助</a>				</div>				</div>';
            this.centerBox = a("<div/>", {
                id: "controlCenter",
                "class": "ucontrol-pop" + e,
                html: c,
                mouseover: a.proxy(this.yvisible, this),
                mouseout: a.proxy(this.yhidden, this)
            }).appendTo(document.body);
            this.is_init = 1
        },
        t_v: 0,
        yvisible: function (b) {
            clearTimeout(this.t_v);
            if (this.vis) {
                return
            }
            this.t_v = setTimeout(a.proxy(this.visible, this, b), 200)
        },
        yhidden: function () {
            clearTimeout(this.t_v);
            if (this.vis) {
                this.t_v = setTimeout(a.proxy(this.iHidden, this), 50)
            }
        },
        visible: function (d) {
            if (!this.is_init) {
                this.boxInit()
            }
            if (this.t) {
                clearTimeout(this.t)
            }
            if (this.btn == d) {
                return this.iHidden()
            }
            this.btn = a(d);
            this.btn.addClass("user-name-on");
            var b = this.btn.offset(),
                c = {
                    width: this.btn.innerWidth(),
                    height: this.btn.innerHeight()
                },
                e = b.left - 294 + c.width / 2;
            this.centerBox.css({
                left: e,
                top: Math.max(24, b.top + c.height - 10)
            }).addClass("ucontrol-pop-open");
            this.vis = 1;
            return false
        },
        iHidden: function () {
            this.btn.removeClass("user-name-on");
            this.btn = null;
            if (this.t) {
                clearTimeout(this.t)
            }
            if (!this.centerBox) {
                return false
            }
            this.centerBox.removeClass("ucontrol-pop-open");
            this.vis = 0;
            return false
        }
    })
})();
(function (c) {
    var b = function (h, f, j, i) {
        var g = h / f;
        var e = j / i;
        var d;
        var k;
        if (h <= j && f <= i) {
            return {
                width: h,
                height: f,
                scale: 1
            }
        }
        if (g >= e) {
            d = j;
            k = d / g
        } else {
            k = i;
            d = k * g
        }
        return {
            width: d,
            height: k,
            scale: d / h
        }
    };
    window.justifySize = b;
    var a = {
        content: '<h5 class="htitle tab-box">					<span class="tab-avatar active" data-target=".avatarcont">上传头像</span>					<span class="tab-bgwall" data-target=".usercardbg">更换资料卡背景</span>					<a onClick="userSet.iHidden()" class="close_big">关闭</a>				</h5>				<div class="avatarcont fix js-nav-target">					<ul class="subNav">						<li><a data-rel="custom" class="on">本地上传<em></em></a></li>						<li><a data-rel="default">官方推荐<em></em></a></li>					</ul>					<div class="p"  style="display:none" >						<iframe name="imgPrev" id="imgPrev" scrolling="no" frameborder="0" allowtransparency="true" style="background-color=transparent"></iframe>					</div>	                <form id="form1" name="form1" enctype="multipart/form-data" method="post" target="imgPrev" action="' + _toDomain + '/user/userinfo/upimg.php">	                    <input type="hidden" value="' + _domain + '" name="next_action">	                    <div class="buttoncont">	                        <p class="choosebtn">	                        	<a title="上传图片">选择文件</a>	                            <span class="uploadbtn" >	                            <input name="file" type="file" id="changePicBox-filebtn" />	                            </span>	                        </p>	                        <P class="tip">支持jpg、jpeg、png格式，文件小于10M。</p>	                    </div>	                </form>				</div>				<div class="usercardbg js-nav-target" style="display:none;">					<p class="msg"></p>					<div class="tab-box"></div>				</div>',
        popBox: 0,
        init: function () {
            var d = jQuery;
            var f = d("<div>", {
                "class": "changePicBox",
                id: "changePicBox"
            });
            this.popBox = f;
            this.popBox.html(this.content);
            f.appendTo(document.body);
            var e = new PicUploader(d("#changePicBox-filebtn")[0], {
                param: {
                    pid: "1003",
                    size: ""
                },
                onReady: function (g) {
                    if (!this.checkType(g, ["jpg", "jpeg", "png"])) {
                        alert("格式不对");
                        return false
                    }
                    this.upload()
                },
                onStart: function () {
                    d("#form1").addClass("loading")
                },
                onComplete: function (h) {
                    d("#form1").removeClass("loading");
                    if (h.flag == "001") {
                        var g = h.content.url;
                        if (g.width < 180 || g.height < 180) {
                            e._revitalize();
                            e.fileinput.val("");
                            return alert("头像尺寸不能小于180*180")
                        }
                        d("#imgPrev").attr("src", "/user/userinfo/upimg.php?img=" + g.link + "&width=" + g.width + "&height=" + g.height);
                        f.find(".p").css("display", "block");
                        d("#form1").css("display", "none")
                    } else {
                        alert(h.content)
                    }
                }
            });
            f.find(".tab-box").on("click", "span", function (h) {
                h.preventDefault();
                var i = d(h.currentTarget);
                var g = d(i.attr("data-target"));
                if (i.hasClass("active")) {
                    return
                }
                i.addClass("active").siblings("span").removeClass("active");
                g.css("display", "block").siblings(".js-nav-target").css("display", "none");
                if (i.hasClass("tab-bgwall")) {
                    a.bgWall.init()
                }
                if (i.hasClass("js-type")) {
                    a.bgWall.changeType(i.attr("data-type"))
                }
            });
            f.find(".subNav").on("click", function (g) {
                var i = d(g.target);
                var h = g.currentTarget;
                if (d.nodeName(i[0], "a")) {
                    g.preventDefault();
                    if (i.hasClass("on")) {
                        return
                    }
                    d(h).find("a[data-rel]").removeClass("on");
                    i.addClass("on");
                    if (i.data("rel") == "default") {
                        f.find(".p").css("display", "block");
                        d("#form1").css("display", "none");
                        var j = d("#imgPrev").attr("src");
                        if (!j || j.indexOf("defaultface") < 0) {
                            d("#imgPrev").attr("src", "/user/userinfo/defaultface.php?next_action=" + _domain)
                        }
                    } else {
                        f.find(".p").css("display", "none");
                        d("#form1").css("display", "block")
                    }
                }
            })
        },
        visible: function (d) {
            if (_puser.supremeMystery == 1) {
                return Prompt.alert("至尊神秘人不允许修改头像")
            }
            getMask();
            if (!this.popBox) {
                this.init()
            }
            this.popBox.css("display", "block");
            if (d == "bgwall") {
                this.popBox.find(".tab-box .tab-bgwall").trigger("click")
            }
        },
        change: function () {
            location.reload()
        },
        iHidden: function () {
            this.popBox.css("display", "none");
            jQuery("#loginMask").remove();
            jQuery("#loginMaskBg").remove()
        },
        bgWall: {
            init: function () {
                var d = this;
                if (this.is_init) {
                    return
                }
                this.is_init = 1;
                this.box = c("#changePicBox .usercardbg");
                this.getSelected()
            },
            getSelected: function () {
                var d = this;
                this.requestBgWall({
                    route: "selectedVideo"
                }, function (f, e) {
                    d.conf = {
                        dpType: e.dpType,
                        allowDpType: e.allowDpType,
                        max: e.maxOptNum,
                        selected: e.selectedNum,
                        current: e.dpType
                    };
                    if (e.allowDpType) {
                        c.each(e.allowDpType, function (h, g) {
                            if (g == 1) {
                                d.image.init()
                            } else {
                                d.video.init(e.videoList)
                            }
                        })
                    }
                    d.setView(e.dpType)
                })
            },
            setView: function (d) {
                var e = this.conf.allowDpType;
                if (d == "1") {
                    this.box.find(".nav-pic").addClass("active");
                    this.box.find(".up-pic").css("display", "block")
                } else {
                    this.box.find(".nav-video").addClass("active");
                    this.box.find(".up-video").css("display", "block")
                }
                if (e.length == 1) {
                    this.box.find(".tab-box").css("display", "none")
                }
                this.setMsg(d)
            },
            requestBgWall: function (d, e) {
                this._request("/user/infoCard/bgWall.php", d, e)
            },
            _request: function (d, e, f) {
                e = e || {};
                c.getJSON(d, e).done(function (g) {
                    f && f(g.flag == "001", g.content)
                })
            },
            changeType: function (d) {
                var e = this;
                if (this._setting) {
                    return
                }
                this._setting = 0;
                this.requestBgWall({
                    route: "setDpType",
                    dpType: d
                }, function (g, f) {
                    calert(f);
                    e._setting = 0
                });
                this.setMsg(d)
            },
            setMsg: function (e) {
                var d = this.box.find(".msg");
                if (e == 1) {
                    d.html("请点击“+”上传资料卡背景墙图片，最多可上传6张")
                } else {
                    d.html("请点击“+”选择资料卡背景墙小视频，最多可选择5个")
                }
            },
            image: {
                template: {
                    nav: '<span class="js-type nav-pic" data-type="1" data-target=".up-pic">使用照片</span>',
                    wrap: '<div class="js-nav-target up-box up-pic" style="display:none;">						<li class="upload-btn">							<input class="file" type="file" name="file" accept="image/*">							<button class="btn" type="button"></button>						</li>					</div>',
                    list: '<li class="pic" id="pic_{id}" data-id="{id}">						<div class="pic-box">							<img src="{picurl}">							<a href="javascript:;" class="del-btn"></a>						</div>						<div class="order-box">							<span class="prev {prevHideClass}"></span>							<span class="next {nextHideClass}"></span>						</div>					</li>'
                },
                _list: [],
                _maxCount: 6,
                init: function () {
                    if (this.is_init) {
                        return
                    }
                    this.is_init = 1;
                    var e = this;
                    var d = a.bgWall.box;
                    var f = a.bgWall.box.find(".tab-box");
                    this.btn = c(this.template.nav).appendTo(f);
                    this.box = c(this.template.wrap).appendTo(d);
                    this.box.on("click", ".prev, .next", function (i) {
                        i.preventDefault();
                        var h = c(i.currentTarget);
                        var g = h.parents("li");
                        if (h.hasClass("prev")) {
                            g.after(g.prev())
                        } else {
                            g.before(g.next())
                        }
                        e.setOrder()
                    });
                    this.getList(function () {
                        e.uploadImage.init()
                    })
                },
                jcrop: {
                    minWidth: 200,
                    minHeight: 200,
                    template: '<div class="jcrop-box clearfix">						<div class="image-box">							<img src="" alt="">						</div>						<div class="btn-box">							<span class="close">重新选择</span>							<span class="cut">确定</span>						</div>					</div>',
                    visible: function (h, g, e, d) {
                        var f = this;
                        if (!this.box) {
                            this.box = c(this.template).appendTo(a.bgWall.image.box);
                            this.imageBox = this.box.find(".image-box");
                            this.image = this.box.find("img");
                            this.box.on("click", ".btn-box span", function (k) {
                                k.preventDefault();
                                var i = c(k.currentTarget);
                                if (i.hasClass("disabled")) {
                                    return
                                }
                                if (i.hasClass("cut")) {
                                    i.addClass("disabled");
                                    var j = f.getCoords();
                                    c.getJSON("/user/infoCard/cutPhoto.php", {
                                        x1: j.x1,
                                        x2: j.x2,
                                        y1: j.y1,
                                        y2: j.y2,
                                        url: f.src
                                    }).done(function (l) {
                                        i.removeClass("disabled");
                                        if (l.flag == "001") {
                                            a.bgWall.image.request({
                                                act: "photo",
                                                uid: _puser.uid,
                                                file: l.content
                                            }, function (n, m) {
                                                if (n) {
                                                    f.hidden();
                                                    a.bgWall.image.uploadImage.clean();
                                                    a.bgWall.image.getList(function () {
                                                        a.bgWall.image.uploadImage.setViewport()
                                                    })
                                                } else {
                                                    calert(m)
                                                }
                                            })
                                        } else {
                                            calert(l.content);
                                            f.hidden()
                                        }
                                    })
                                } else {
                                    f.hidden()
                                }
                            })
                        }
                        this.id = h;
                        this.src = g;
                        this.imageWidth = e;
                        this.imageHeight = d;
                        this.boxWidth = this.imageBox.width();
                        this.boxHeight = this.imageBox.height();
                        this.justified = b(e, d, this.boxWidth, this.boxHeight);
                        this.image.attr("src", g).show();
                        this.image.css({
                            width: this.justified.width,
                            height: this.justified.height
                        });
                        this.image.on("load", c.proxy(this, "create"))
                    },
                    hidden: function () {
                        if (this.box) {
                            this.box.remove();
                            this.box = this.image = null
                        }
                        c("#pic_" + this.id).remove();
                        this.destroy()
                    },
                    create: function () {
                        var f = this;
                        var d = this.justified;
                        var e = function () {};
                        $LAB.script("//vj0.xiu123.cn/js/libs/jcrop.min.js").wait(function () {
                            setTimeout(function () {
                                f.image.Jcrop({
                                    bgFade: true,
                                    bgOpacity: 0.6,
                                    setSelect: [0, 0, (f.imageWidth * d.scale) / 2, (f.imageHeight * d.scale) / 2],
                                    minSize: [f.minWidth * d.scale, f.minHeight * d.scale],
                                    allowSelect: true,
                                    aspectRatio: 1
                                }, function () {
                                    f.jcrop = this
                                })
                            }, 100)
                        })
                    },
                    destroy: function () {
                        this.jcrop && this.jcrop.destroy()
                    },
                    getCoords: function () {
                        var d = this.jcrop.tellSelect();
                        var e = this.justified.scale;
                        return {
                            x1: d.x / e,
                            y1: d.y / e,
                            x2: d.x2 / e,
                            y2: d.y2 / e,
                            w: Math.floor(d.w / e),
                            h: Math.floor(d.h / e)
                        }
                    }
                },
                uploadImage: {
                    template: '<li class="pic" id="pic_{id}" data-id="{id}">						<div class="uploading-box">							<span class="percent">0%</span>						</div>						<div class="pic-box">							<img src="">							<a href="javascript:;" class="del-btn"></a>						</div>					</li>',
                    init: function () {
                        if (this.is_init) {
                            return
                        }
                        this.is_init = 1;
                        var e = this;
                        var d = (this.wrap = a.bgWall.image.box.on("click", ".del-btn", c.proxy(this, "_deleteHandler")));
                        $LAB.script("//vj0.xiu123.cn/mini/js/base/fileuploader_4.js").wait(function () {
                            var f = new FileUploader(d.find("input[type=file]"), {
                                api: location.protocol + (location.hostname.indexOf("dev.v.6.cn") > -1 ? "//devpic.v.6.cn" : "//pic.v.6.cn") + "/api/uploadForGeneral.php",
                                params: {
                                    pid: 1001,
                                    size: "s2,b1"
                                }
                            });
                            f.on("ready", c.proxy(e, "_readyHandler"));
                            f.on("process", c.proxy(e, "_processHandler"));
                            f.on("start", c.proxy(e, "_startHandler"));
                            f.on("progress", c.proxy(e, "_progressHandler"));
                            f.on("complete", c.proxy(e, "_completeHandler"));
                            f.on("end", c.proxy(e, "_endHandler"));
                            e.btn = e.wrap.find(".upload-btn");
                            e.uploader = f;
                            e.setViewport()
                        })
                    },
                    getPicArr: function () {
                        var d = [];
                        c.each(this.wrap.find("li.pic"), function () {
                            var e = c(this).find("img");
                            var f = e.attr("data-src");
                            d.push(f)
                        });
                        return d
                    },
                    getSize: function () {
                        return this.getPicArr().length
                    },
                    getParam: function () {
                        return {
                            pic: this.getPicArr().join(",")
                        }
                    },
                    setFileText: function (e, d) {
                        c("#pic_" + e).find(".percent").text(d)
                    },
                    setDisplay: function (d) {
                        this.btn.css("display", d ? "inline-block" : "none")
                    },
                    setViewport: function () {
                        var e = a.bgWall.image._list.length;
                        var d = a.bgWall.image._maxCount;
                        this.setDisplay(e >= d ? 0 : 1)
                    },
                    clean: function () {
                        this._uploading = 0;
                        this.wrap.find("li.pic").remove();
                        this.setViewport()
                    },
                    destroy: function () {
                        this.clean();
                        this.wrap.off().remove();
                        this.is_init = 0;
                        this.uploader = this.wrap = null
                    },
                    find: function (e) {
                        var d;
                        c.each(a.bgWall.image._list, function (f, g) {
                            if (g.id == e) {
                                d = [f, g];
                                return false
                            }
                        });
                        return d
                    },
                    _deleteHandler: function (h) {
                        h.preventDefault();
                        var f = c(h.target);
                        var d = f.parents("li");
                        var i = d.attr("data-id");
                        var g = this;
                        a.bgWall.image.deleteImage(i, function (e) {
                            if (e) {
                                d.remove();
                                a.bgWall.image.getOrder();
                                g.setViewport()
                            }
                        })
                    },
                    _readyHandler: function (k) {
                        var l = k;
                        var j = 20 * 1024 * 1024;
                        var m = ["jpg", "jpeg", "png"];
                        for (var h = 0; h < l.length; h++) {
                            var d = l[h].name;
                            if (!this.uploader.checkFileType(d, m)) {
                                return alert("文件类型错误 - " + d)
                            }
                            if (l[h].size && l[h].size > j) {
                                return alert("文件过大 - " + d)
                            }
                        }
                        var g = a.bgWall.image._maxCount;
                        var f = a.bgWall.image._list.length;
                        var e = l.length;
                        if (f + e > g) {
                            calert("每次最多上传 " + g + " 张图片" + (f == 0 ? "。" : "，本次您还能上传 " + (g - f) + " 张。"))
                        } else {
                            this.uploader.upload()
                        }
                    },
                    _processHandler: function (d, f) {
                        var e = [];
                        var g = this.template;
                        c.each(f, function (j, h) {
                            e.push(g.replace(/{id}/g, h.id))
                        });
                        c(e.join("")).insertBefore(this.btn)
                    },
                    _startHandler: function (d) {
                        this._uploading = 1;
                        this.setDisplay(0)
                    },
                    _progressHandler: function (e, d) {
                        this.setFileText(d.id, e + "%")
                    },
                    _completeHandler: function (f, d) {
                        var e = this;
                        if (f.flag == "001") {
                            a.bgWall.image.jcrop.visible(d.id, d.result.content.url.link, d.result.content.url.width, d.result.content.url.height)
                        } else {
                            calert(f.content);
                            c("#pic_" + d.id).remove();
                            this.setViewport()
                        }
                    },
                    _endHandler: function (d) {
                        this._uploading = 0;
                        this.setViewport()
                    }
                },
                request: function (d, e) {
                    a.bgWall._request("/anchorBackgroundPic.php", d, e)
                },
                getList: function (e) {
                    var d = this;
                    this.request({
                        act: "show",
                        uid: _puser.uid
                    }, function (g, f) {
                        if (g) {
                            d.setList(f);
                            e && e(f)
                        } else {
                            calert(f)
                        }
                    })
                },
                setList: function (e) {
                    var d = [];
                    var f = this.template.list;
                    var g = e.length - 1;
                    c.each(e, function (h, j) {
                        d.push(f.replace(/{id}/g, j.id).replace(/{picurl}/g, j.picurl).replace(/{pos}/g, j.pos).replace(/{prevHideClass}/, h == 0 ? "hid" : "").replace(/{nextHideClass}/, h == g ? "hid" : ""))
                    });
                    this._list = e;
                    this.box.prepend(d.join(""))
                },
                getOrder: function () {
                    var f = {};
                    var d = this.box.find("li.pic");
                    var e = d.length - 1;
                    c.each(this.box.find("li.pic"), function (h) {
                        var g = c(this);
                        var i = g.attr("data-id");
                        g.find(".prev").removeClass("hid");
                        g.find(".next").removeClass("hid");
                        if (h == 0) {
                            g.find(".prev").addClass("hid")
                        }
                        if (h == e) {
                            g.find(".next").addClass("hid")
                        }
                        f[i] = h + 1
                    });
                    return f
                },
                setOrder: function () {
                    var d = this.getOrder();
                    this.request({
                        act: "change",
                        uid: _puser.uid,
                        posAry: c.toJSON(d)
                    }, function (f, e) {
                        calert(e)
                    })
                },
                deleteImage: function (f, e) {
                    var d = this;
                    c.each(this._list, function (g, h) {
                        if (h.id == f) {
                            d.request({
                                act: "delPic",
                                uid: _puser.uid,
                                id: f
                            }, function (j, i) {
                                if (j) {
                                    d._list.splice(g, 1)
                                }
                                e && e(j);
                                calert(i)
                            })
                        }
                    })
                }
            },
            video: {
                _conf: {},
                template: {
                    nav: '<span class="js-type nav-video" data-type="2" data-target=".up-video">使用小视频</span>',
                    wrap: '<div class="js-nav-target up-box up-video" style="display:none;">						<li class="upload-btn">							<button class="btn"></button>						</li>					</div>',
                    list: '<li class="pic" id="video_{vid}" data-id="{vid}">						<div class="pic-box">							<img src="{pic}">							<a href="javascript:;" class="del-btn"></a>						</div>						<div class="order-box">							<span class="prev {prevHideClass}"></span>							<span class="next {nextHideClass}"></span>						</div>					</li>'
                },
                init: function () {
                    var e = this;
                    if (!this.box) {
                        var d = a.bgWall.box;
                        var f = a.bgWall.box.find(".tab-box");
                        this.btn = c(this.template.nav).appendTo(f);
                        this.box = c(this.template.wrap).appendTo(d);
                        this.box.on("click", ".upload-btn", function (g) {
                            g.preventDefault();
                            e.videolist.visible()
                        }).on("click", ".prev, .next", function (i) {
                            i.preventDefault();
                            var h = c(i.currentTarget);
                            var g = h.parents("li");
                            if (h.hasClass("prev")) {
                                g.after(g.prev())
                            } else {
                                g.before(g.next())
                            }
                            e.setOrder()
                        }).on("click", ".del-btn", function (i) {
                            i.preventDefault();
                            var h = c(i.currentTarget);
                            var g = h.parents("li");
                            var j = g.attr("data-id");
                            g.remove();
                            e.deleteVideo(j)
                        })
                    }
                    this.getList()
                },
                getList: function () {
                    var d = this;
                    this.requestMiniVideo({
                        route: "videoList"
                    }, function (f, e) {
                        if (f) {
                            d._conf = {
                                selectedNum: e.selectedNum,
                                maxOptNum: e.maxOptNum,
                                selectedIds: e.selectedIds
                            };
                            d._selectedList = {};
                            d._unSelectedList = {};
                            var g = e.list;
                            c.each(g, function (h, j) {
                                if (c.inArray(j.vid, e.selectedIds) > -1) {
                                    d._selectedList[j.vid] = j
                                } else {
                                    d._unSelectedList[j.vid] = j
                                }
                            });
                            d.setList(d._selectedList)
                        } else {
                            calert(e)
                        }
                    })
                },
                request: function (d, e) {
                    a.bgWall.requestBgWall(d, e)
                },
                requestMiniVideo: function (d, e) {
                    a.bgWall._request("/user/infoCard/miniVideo.php", d, e)
                },
                setList: function (g) {
                    var f = this;
                    var h = this.template.list;
                    var d = this._conf.selectedIds;
                    var i = d.length - 1;
                    var e = [];
                    c.each(d, function (j, l) {
                        var k = f._selectedList[l];
                        e.push(h.replace(/{vid}/g, k.vid).replace(/{pic}/g, k.pic).replace(/{resUrl}/g, k.resUrl).replace(/{prevHideClass}/, j == 0 ? "hid" : "").replace(/{nextHideClass}/, j == i ? "hid" : ""))
                    });
                    this.box.find("li.pic").remove();
                    this.box.prepend(e.join(""));
                    this.setDisplay()
                },
                getOrder: function () {
                    var d = this.box.find("li.pic");
                    var f = d.length - 1;
                    var e = [];
                    c.each(this.box.find("li.pic"), function (h) {
                        var g = c(this);
                        var i = g.attr("data-id");
                        g.find(".prev").removeClass("hid");
                        g.find(".next").removeClass("hid");
                        if (h == 0) {
                            g.find(".prev").addClass("hid")
                        }
                        if (h == f) {
                            g.find(".next").addClass("hid")
                        }
                        e.push(i)
                    });
                    return e
                },
                setOrder: function () {
                    var d = this.getOrder();
                    this.request({
                        route: "setVideoOrder",
                        vidStr: d.join(",")
                    }, function (f, e) {
                        calert(e)
                    })
                },
                setDisplay: function () {
                    var d = this._conf.maxOptNum;
                    var e = this._conf.selectedNum;
                    this.box.find(".upload-btn").css("display", e >= d ? "none" : "block")
                },
                deleteVideo: function (d) {
                    var f = this;
                    var e = c.inArray(d, this._conf.selectedIds);
                    if (e > -1) {
                        this._conf.selectedIds.splice(e, 1);
                        this._conf.selectedNum--;
                        c.each(this._selectedList, function (g, h) {
                            if (d == h.vid) {
                                f._unSelectedList[d] = h;
                                delete f._selectedList[d];
                                return false
                            }
                        });
                        this.setDisplay();
                        this.setOrder()
                    }
                },
                videolist: {
                    template: {
                        wrap: '<div class="videolist-wrap">							<h3>								<span>已上传的小视频</span>							</h3>							<div class="content">							<div class="list"></div>							<div class="list-empty" style="display:none;">								<p>您还没有上传小视频，请先到个人主页上传</p>							</div>							</div>							<div class="btn-box">								<span class="close">取消</span>								<span class="btn">确定</span>							</div>						</div>',
                        list: '<li class="pic" id="videolist_{vid}" data-id="{vid}">							<div class="pic-box">								<img src="{pic}">								<span class="play"></span>								<span class="select"></span>							</div>						</li>'
                    },
                    _queue: [],
                    add: function (d) {
                        this._queue.push(d)
                    },
                    remove: function (e) {
                        var d = -1;
                        c.each(this._queue, function (g, f) {
                            if (f == e) {
                                d = g;
                                return false
                            }
                        });
                        if (d > -1) {
                            this._queue.splice(d, 1)
                        }
                    },
                    submit: function (d) {
                        var f = this;
                        var g = a.bgWall.video._conf.selectedIds.slice(0);
                        var e = g.concat(this._queue);
                        d.addClass("disabled");
                        a.bgWall.video.requestMiniVideo({
                            route: "selectVideo",
                            vidStr: e.join(",")
                        }, function (i, h) {
                            if (i) {
                                a.bgWall.video.getList();
                                f.hidden()
                            }
                            d.removeClass("disabled");
                            calert(h)
                        })
                    },
                    visible: function () {
                        var e = this;
                        if (!this.box) {
                            var d = a.bgWall.box;
                            this.box = c(this.template.wrap).appendTo(d);
                            this.box.on("click", ".list li, .btn-box span", function (g) {
                                g.preventDefault();
                                var f = c(g.currentTarget);
                                if (f.hasClass("btn")) {
                                    if (e._queue.length == 0) {
                                        return calert("请选择小视频")
                                    }
                                    e.submit(f)
                                } else {
                                    if (f.hasClass("close")) {
                                        e.hidden()
                                    } else {
                                        var h = f.attr("data-id");
                                        f.toggleClass("selected");
                                        if (f.hasClass("selected")) {
                                            e.add(h)
                                        } else {
                                            e.remove(h)
                                        }
                                    }
                                }
                            })
                        }
                        e._list = a.bgWall.video._unSelectedList;
                        e.box.css("display", "block");
                        e.setList(e._list)
                    },
                    setList: function (f) {
                        var e = this.template.list;
                        var d = [];
                        c.each(f, function (g, h) {
                            var j = e.replace(/{vid}/g, h.vid).replace(/{resUrl}/g, h.resUrl).replace(/{pic}/g, h.pic);
                            d.push(j)
                        });
                        this.box.find(".list-empty").css("display", d.length == 0 ? "block" : "none");
                        this.box.find(".list").html(d.join(""))
                    },
                    hidden: function () {
                        this._queue = [];
                        this.box && this.box.hide()
                    }
                }
            }
        }
    };
    window.userSet = a
})(jQuery);

function toHomeTab(a) {
    try {
        getLives.setList(a);
        return false
    } catch (b) {
        return true
    }
}

function myOpen(c) {
    var i = c.obj,
        b = c.width,
        e = c.height;
    var a = window.screen.availWidth,
        d = window.screen.availHeight;
    var g = (a - b) / 2,
        f = (d - e) / 2 - 20;
    window.open(i.href, "", "height=" + e + ", width=" + b + ", top=" + f + ", left=" + g + ", toolbar=no, menubar=no, scrollbars=no, status=no");
    return false
}

function pscheSubmit(b) {
    var a = b.getElementsByTagName("select");
    b.stm.value = a[1].value + "-" + a[2].value + "-" + a[3].value + " " + a[4].value + ":" + a[5].value + ":00";
    b.submit()
}

function addOn() {
    var b = $$("tr");
    if (!b.length) {
        return
    }
    for (var c = 0, a = b.length; c < a; c++) {
        if (b[c].cells[0].tagName.toLowerCase() == "th") {
            continue
        }
        b[c].addEvent("mouseover", function () {
            this.className = "on"
        });
        b[c].addEvent("mouseout", function () {
            this.className = ""
        })
    }
}

function addEventOn(b) {
    for (var a = 0; a < b.length; a++) {
        b[a].onmouseover = function () {
            this.className = "on"
        };
        b[a].onmouseout = function () {
            this.className = ""
        }
    }
}

function chkNum(c, b) {
    var c = c || window.event,
        a = c.which || c.keyCode;
    return (a > 47 && a < 58) || a == 8 || a == 37 || a == 39
}

function getMoney6b(d) {
    var c = jQuery("#money6b");
    var e = d.value;
    e = e.replace(/\D/g, "");
    d.value = e;
    var b = String(e / 100).split("."),
        a = b[0].split("").reverse().join("").replace(/(\d{3})(?=\d)/g, "$1 ,").split("").reverse().join("");
    c.html(a + (b[1] ? "." + b[1] : ""))
}

function createPopBox(a) {
    var b = document.createElement("div");
    b.className = "popBox2";
    if (!a) {
        var a = ""
    }
    b.innerHTML = '<table><tr class="top"><td class="l"></td><td class="m"></td><td class="r"></td></tr>					<tr class="middle"><td class="l"></td><td class="m">					<div class="content">' + a + '</div>					</td><td class="r"></td></tr>					<tr class="bottom"><td class="l"></td><td class="m"></td><td class="r"></td></tr>					</table>';
    b.content = b.getElementsByTagName("div")[0];
    return b
}

function createHpop(a, b) {
    var c = document.createElement("div");
    c.className = "Hpop";
    if (!a) {
        a = ""
    }
    if (b) {
        b = '<p class="mt">' + b + "</p>"
    }
    c.innerHTML = '<div class="ph"><span></span></div><img class="close" onclick="this.parentNode.vis()" alt="关闭" src="//vr0.6rooms.com/images/base/pixel.png"/>		<div class="pm pastNotice">' + b + a + '</div>		<div class="pf"><span></span></div>';
    c.v = 0;
    c.vis = function () {
        if (this.v) {
            this.style.display = "none";
            this.v = 0
        } else {
            this.style.display = "block";
            this.v = 1
        }
    };
    c.content = c.getElementsByTagName("div")[1];
    return c
}
var playerAd = function (g) {
    if (!jQuery("#playerAd")[0]) {
        return
    }
    var c = $$("#playerAd ul")[0],
        d = new Fx.Tween(c, {
            property: "margin-top",
            fps: 12,
            duration: "short"
        }),
        f = 0,
        b = 25,
        e = 0,
        h = 0,
        a = function () {
            var j = e,
                i = j - 25;
            d.start(j, i);
            e = i;
            h = window.setTimeout(a, 5000)
        };
    d.addEvent("complete", function () {
        f = f == 0 ? c.offsetHeight : f;
        if (e <= -Math.round(f / 2)) {
            e = 0;
            d.set("margin-top", 0)
        }
    });
    c.innerHTML = g + g;
    c.style.marginTop = "0";
    $("player").addClass("hasAd");
    a();
    $$("#playerAd .close")[0].addEvent("click", function () {
        window.clearTimeout(h);
        h = 0;
        a = null;
        d = null;
        c = null;
        $("player").removeClass("hasAd");
        $("playerAd").destroy()
    })
};

function vStatistics(a) {
    new Image().src = "https://6.cn/x.php?f=0&op=" + a
}(function () {
    if (!document.body) {
        setTimeout(arguments.callee, 1000);
        return
    }
    if (!frames.emptyIframe) {
        var c;
        var a = document.body;
        var b = document.createElement("div");
        b.innerHTML = '<iframe name="emptyIframe" style="display:none" ></iframe>';
        c = b.firstChild;
        a.insertBefore(c, a.firstChild)
    }
})();
var Prompt;
(function () {
    var a = jQuery;
    Prompt = {
        box: 0,
        mask: 0,
        queue: [],
        ie6: a.browser.msie && a.browser.version == "6.0",
        t: 0,
        html: '<div class="popInner">$btn_close<h3>$title</h3><div class="popCon fix">$content</div><div class="popBtn"><p>$btn_sure $btn_cancel</p></div></div>',
        title: "六间房提示您",
        create: function (f) {
            if (this.box) {
                this.queue.push(f)
            } else {
                this.callback = f.callback;
                var c = f.btn_sure ? '<a class="sure' + (f.btn_sure.disabled ? " disabled" : "") + '" href="' + (f.btn_sure.link || "") + '" target="' + (f.btn_sure.target || "_self") + '" data-tracing="' + (f.btn_sure.tracing || "") + '">' + (f.btn_sure.text || "确定") + "</a>" : "",
                    g = f.btn_cancel ? '<a class="cancel' + (f.btn_cancel.disabled ? " disabled" : "") + '" href="' + (f.btn_cancel.link || "") + '" target="' + (f.btn_cancel.target || "_self") + '" data-tracing="' + (f.btn_cancel.tracing || "") + '">' + (f.btn_cancel.text || "取消") + "</a>" : "",
                    e = f.btn_cancel && f.btn_cancel.link ? '<a class="cancel close-big" href="' + f.btn_cancel.link + '" target="' + (f.btn_cancel.target || "_self") + '">取消</a>' : '<a class="close-big cancel _xxx">取消</a>';
                var b = this.html.replace("$title", f.title || this.title).replace("$content", f.content || "").replace("$btn_close", e).replace("$btn_sure", c).replace("$btn_cancel", g);
                this.box = a("<div/>", {
                    "class": "promptbox " + (f.wrapClass || ""),
                    html: b
                }).appendTo(document.body).addClass(f.class_name || "");
                if (f.tracing) {
                    this.box.attr("data-tracing", f.tracing)
                }
                this.box.find("img").on("load", function () {
                    Prompt.setPos()
                });
                this.setPos();
                this.box.css("visibility", "visible");
                if (f.onCreateAfter) {
                    f.onCreateAfter(this.box)
                }
                if (f.width) {
                    var d = Math.floor(f.width / 2);
                    this.box.css({
                        width: f.width,
                        "margin-left": -d
                    })
                }
                this.box.on("click", "a.cancel, a.cancel_xxx, a.sure", function (h) {
                    if (!f.tracing) {
                        h.stopPropagation()
                    }
                    var i = h.target.className;
                    if (i.indexOf("disabled") > -1) {
                        return false
                    }
                    if (i.indexOf("sure") > -1) {
                        if (f.btn_sure && f.btn_sure.link) {
                            setTimeout(function () {
                                Prompt.close(1)
                            }, 200);
                            return true
                        }
                        h.preventDefault();
                        if (f.onSubmit) {
                            if (!f.onSubmit()) {
                                return
                            }
                        }
                        Prompt.close(1)
                    } else {
                        if (i.indexOf("_xxx") > -1) {
                            h.preventDefault();
                            Prompt.close(0, true)
                        } else {
                            if (i.indexOf("cancel") > -1) {
                                if (f.btn_cancel && f.btn_cancel.link) {
                                    setTimeout(Prompt.close, 200);
                                    return true
                                } else {
                                    Prompt.close(0)
                                }
                            }
                        }
                    }
                    h.preventDefault()
                });
                Mask.create((f.opacity > -1 && f.opacity) || false, 99999);
                if (f.delay) {
                    this.t = setTimeout(this.close, f.delay)
                }
                return this.box
            }
        },
        setPos: function () {
            var c = location.hash;
            var b = parseInt(c.replace(/#.*v6hash/, ""));
            var d = c.indexOf("v6hash") > -1;
            Prompt.box.css({
                "z-index": 100005,
                "margin-top": -Math.floor(Prompt.box.height() / 2) - 50,
                top: d ? 100 + b + parseInt(Prompt.box.height()) : "50%"
            })
        },
        close: function (c, b) {
            var d = Prompt,
                c = c || 0;
            if (d.callback) {
                d.callback(c, b)
            }
            clearTimeout(d.t);
            d.box.remove();
            Mask.remove();
            d.callback = null;
            d.box = null;
            var e = d.queue.shift();
            if (e) {
                d.create(e)
            }
        },
        alert: function (d, b, c) {
            Prompt.create({
                btn_sure: 1,
                delay: jQuery.type(b) == "number" ? b : 6000,
                content: '<div style="padding:6px 0">' + d + "</div>",
                callback: jQuery.type(b) == "function" ? b : jQuery.type(c) == "function" ? c : jQuery.noop
            })
        },
        confirm: function (b, c) {
            Prompt.create({
                btn_sure: 1,
                btn_cancel: 1,
                content: b,
                callback: c
            })
        }
    }
})();
(function (b) {
    window._flashStars = {
        "7116": 1,
        "7117": 2,
        "7118": 3,
        "7119": 4,
        "7120": 5,
        "8600": 6,
        "8601": 7,
        "8602": 8,
        "10415": 9,
        "10416": 10
    };
    window._lightStars = {
        "8583": 1,
        "8603": 2,
        "8604": 3,
        "8605": 3
    };
    var a = b.extend({}, _flashStars, _lightStars);
    window.richStarsEffect = function (d) {
        d = d || [];
        var g = function (j) {
            var k = "";
            for (var h = 0; h < j.length; h++) {
                var l = j[h];
                if (b.inArray(l, d) > -1 && a[l]) {
                    k = a[l];
                    break
                }
            }
            return k
        };
        var c = [];
        for (var f in _flashStars) {
            c.push(f)
        }
        var e = g(c);
        return {
            flash: e ? '<img class="richFlash1" src="//vr1.xiu123.cn/images/level/richFlash/v2/s' + e + '.gif">' : "",
            light: ""
        }
    };
    window.getRichIcon = function (f) {
        if (window.newRank && newRank.isUseNew()) {
            return window.newRank.getRankIcon(f)
        }
        if (f.isSupMystery == 1) {
            return ('<i class="rich280' + (f.fid ? " rich-" + f.fid : "") + '"></i>')
        }
        var d = richStarsEffect(f.prop || []);
        var c = (f.coin6pic ? "rich-pic" : "rich" + f.coin6rank) + (f.fid ? " rich-" + f.fid : "");
        var e = f.coin6pic ? ' style="background-image:url(' + f.coin6pic + ')"' : "";
        return ('<i class="' + c + '"' + e + ' coin6pic="1">' + d.flash + "</i>")
    };
    window.ridEffect = function (d) {
        var c = "";
        d = d || {};
        if (d.customImagePc && d.customImagePc.length) {
            c = "background-image:url(" + d.customImagePc + ");text-indent:-9999px;"
        } else {
            if (d.backgroundPc && d.backgroundPc.length) {
                c = "background-image:url(" + d.backgroundPc + ");color:" + d.colorPc + ";"
            } else {
                c = "padding:0;width:auto;"
            }
        }
        if (c.indexOf("background-image") > -1) {
            c += "width:" + d.backgroundWidth / 3 + "px; height:" + d.backgroundHeight / 3 + "px;"
        }
        return c
    };
    window.ridEffectHtml = function (g, e, c) {
        var f = window.ridEffect(e);
        var d = g.length || 0;
        var h = '<{tag} class="rid-effect rid-bit-{cls}" style="{style}">{rid}</{tag}>';
        switch (c) {
            case 1:
                c = "span";
                break;
            case 2:
                c = "i";
                break;
            default:
                c = "em"
        }
        h = h.replace(/{tag}/g, c).replace(/{style}/g, f).replace(/{rid}/g, g).replace(/{cls}/g, d);
        return h
    }
})(jQuery);
(function (b) {
    var a = location.host.indexOf("dev") > -1 ? "/js/tpls/base/usercard_pop_v29.html" : "/js/tpls/base/usercard_pop_v29.html";
    window.UserInfoCard = {
        tpl: a,
        current: {},
        createCard: function (d) {
            if (this.card) {
                d && d();
                return this.card
            }
            if (this.loading) {
                return
            }
            this.loading = 1;
            var c = this;
            b.ajax({
                dataType: "text",
                url: c.tpl,
                success: function (e) {
                    c.loading = 0;
                    c.card = b(e).appendTo(document.body).filter(".usercard-pop");
                    c.contentWrap = c.card.find("div.content");
                    c.template = {
                        user: b("#usercard_tpl_user").html(),
                        anchor: b("#usercard_tpl_anchor").html(),
                        mystery: b("#usercard_tpl_mystery").html(),
                        badgeList: b("#usercard_tpl_badge_list").html()
                    };
                    b("#usercard_tpl_user, #usercard_tpl_anchor, #usercard_tpl_badge_list, #usercard_tpl_mystery").remove();
                    c.card.on("click", "a", b.proxy(c, "_clickHandler"));
                    d && d()
                }
            })
        },
        alert: function (d) {
            var c = this.card.find(".alert-box");
            c.addClass("alert-v").html("<p>" + d + "</p>");
            clearTimeout(this._atm);
            this._atm = setTimeout(function () {
                c.empty().removeClass("alert-v")
            }, 3000)
        },
        _clickHandler: function (i) {
            var h = b(i.currentTarget);
            var c = this.curData.userData;
            var g = c.uid;
            if (h.hasClass("refresh")) {
                i.stopPropagation();
                this.curData = {};
                that.getCard(g)
            } else {
                if (h.hasClass("close")) {
                    i.stopPropagation();
                    this.hCard()
                } else {
                    if (h.hasClass("share")) {
                        if (window.page && page.tpl == "2016" && page.rid == g) {
                            i.preventDefault();
                            b("#js-share").mouseenter();
                            this.hCard()
                        }
                    } else {
                        if (h.hasClass("to-fans")) {
                            if (window.page && page.tpl == "2016" && page.rid == g) {
                                i.preventDefault();
                                b("#fansGroupFlag .fansGroupNameBtn").click();
                                this.hCard()
                            } else {
                                if (!h.attr("data-name")) {
                                    i.preventDefault();
                                    this.alert("主播暂未开通粉丝团")
                                }
                            }
                        } else {
                            if (h.hasClass("to-guard")) {
                                if (window.page && window.guardOpen) {
                                    if (page.rid == g) {
                                        i.preventDefault();
                                        guardOpen.open(g);
                                        this.hCard()
                                    } else {
                                        if (page.tpl == "voice2018" && Room_voice.hostUids) {
                                            if (Room_voice.hostUids.indexOf(g / 1) > -1) {
                                                i.preventDefault();
                                                guardOpen.open(g);
                                                this.hCard()
                                            }
                                        }
                                    }
                                }
                            } else {
                                if (h.hasClass("copy")) {
                                    var f = h.siblings("input");
                                    f.focus();
                                    f.select();
                                    try {
                                        if (document.execCommand("copy", false, null)) {
                                            this.alert("复制成功")
                                        } else {
                                            this.alert("您的浏览器不支持复制")
                                        }
                                    } catch (i) {}
                                } else {
                                    if (h.hasClass("chat")) {
                                        if (!_puser.uid) {
                                            Login.toLogin()
                                        } else {
                                            if (window.IMR) {
                                                IMR.openUserCvs(g);
                                                this.hCard()
                                            } else {
                                                this.alert("当前页面不支持私聊")
                                            }
                                        }
                                    } else {
                                        if (h.hasClass("send-msg")) {
                                            if (!_puser.uid) {
                                                Login.toLogin();
                                                return false
                                            }
                                            if (window.page) {
                                                i.preventDefault();
                                                Room.chatList.setCurUser(b.extend({
                                                    pri: 0
                                                }, c));
                                                this.hCard()
                                            } else {
                                                this.alert("当前页面不支持@TA")
                                            }
                                        } else {
                                            if (h.hasClass("send-gift")) {
                                                if (!_puser.uid) {
                                                    Login.toLogin();
                                                    return false
                                                }
                                                if (window.page) {
                                                    i.preventDefault();
                                                    Room.present.setTou(c);
                                                    Room.present.select_gift(1, true);
                                                    this.hCard()
                                                } else {
                                                    this.alert("当前页面不支持送礼")
                                                }
                                            } else {
                                                if (h.hasClass("opt-black")) {
                                                    if (!_puser.uid) {
                                                        Login.toLogin();
                                                        return false
                                                    }
                                                    if (h.hasClass("disabled")) {
                                                        return
                                                    }
                                                    h.addClass("disabled");
                                                    var d = h.attr("badType");
                                                    b.getJSON("/coop/mobile/addBadUser.php", {
                                                        type: d,
                                                        tuid: g
                                                    }, function (e) {
                                                        h.removeClass("disabled");
                                                        if (e.flag == "001") {
                                                            if (d == 1) {
                                                                h.attr("badType", 2).html("取消拉黑")
                                                            } else {
                                                                h.attr("badType", 1).html("拉黑")
                                                            }
                                                        } else {
                                                            Prompt.alert(e.content)
                                                        }
                                                    })
                                                } else {
                                                    if (h.hasClass("to-badge-wall")) {
                                                        this.badgeWall.getData(g)
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
            return true
        },
        dragable: function () {
            var c = this.card;
            $LAB.script(JSF.jq_drag).wait(function () {
                var g = Math.floor(c.width() / 2);
                var f = Math.floor(c.height() / 2);
                var e = b(window).width();
                var d = b(document).height();
                c.draggable({
                    handle: c.find("div.mask"),
                    containment: [70 + g, 55 + f, e - c.outerWidth() + g, d - c.outerHeight() + f]
                })
            })
        },
        getCard: function (d, c, f) {
            var e = this;
            d = d / 1;
            if (!d || d > 1900000000) {
                return
            }
            if (window.clonesConfig && window.clonesConfig.valid(d)) {
                return
            }
            if (c && this.style == "btn") {
                this.btn = b(c)
            }
            if (this.current.uid == d) {
                this._vCard(d)
            } else {
                if (this.is_get) {
                    return
                }
                if (this.style == "win") {
                    this.card.addClass("usercard-load");
                    this._vCard()
                }
                this.is_get = 1;
                b.getJSON("/user/infoCard/infoCard.php", {
                    uid: d,
                    from: f || "",
                    selfUid: _puser.uid || 0,
                    roomUid: window.page ? page.rid : 0
                }).done(function (g) {
                    if (g.flag == "001") {
                        e._setCard(g.content)
                    } else {
                        calert(g.content);
                        e.hCard()
                    }
                    e.is_get = 0
                })
            }
        },
        _getBadgeContent: function () {
            var e = [];
            var c = 5;
            var d = this.curData.badge;
            if (d.ids.length > 0) {
                e.push('<div class="user-badge-list">');
                b.each(d.ids, function (h, j) {
                    var g = Badge.getImg(j);
                    if (h < c && g) {
                        e.push(g)
                    }
                });
                e.push("</div>")
            } else {
                e.push('<span class="no-badge"></span>')
            }
            var f = this._getTracing("badge");
            e.push('<a data-tracing="' + f + '" class="to-badge-wall" title="查看徽章墙">' + (d.num || "暂无") + '<em class="icon-arrow"></em></a>');
            return e.join("")
        },
        _getTracing: function (d) {
            var e = "";
            var c = this.curData && this.curData.isAnchor;
            switch (d) {
                case "bgwall":
                    e = c ? "fpro_bgwall" : "fup_bgwall";
                    break;
                case "badge":
                    e = c ? "fpro_badge" : "fup_badge";
                    break;
                case "showbtn":
                    e = c ? "fprofileCard" : "fuprofileCard";
                    break
            }
            return e
        },
        _getBgContent: function (g) {
            var g = this.curData;
            var d = g.bgWall;
            var c = d.res.length;
            var h = d.type == "2";
            var e = [];
            if (c > 1) {
                e.push('<a href="" class="prev"></a>');
                e.push('<a href="" class="next"></a>')
            }
            var i = this._getTracing("bgwall");
            e.push('<a data-tracing="' + i + '" href="/profile/index.php?rid=' + g.userData.rid + '" target="_blank" class="to-profile" title="查看个人主页"></a>');
            var f = [];
            b.each(d.res, function (j, l) {
                var k = b("<li>").css({
                    backgroundImage: "url(" + l.pic + ")",
                    backgroundRepeat: "no-repeat",
                    backgroundSize: "cover"
                });
                k.attr("data-image", l.pic);
                if (h) {
                    if (!l.resource) {
                        return
                    }
                    k.attr("data-source", l.resource)
                }
                f.push(k[0].outerHTML)
            });
            e.push('<ul class="list">' + f.join("") + "</ul>");
            return e.join("")
        },
        _setCard: function (g) {
            if (g.option.isSupMystery == 1) {
                this._setMystery(g);
                return
            }
            var i = this;
            var k;
            var e = this.card;
            var f = this.contentWrap;
            var c = g.dpType == "1";
            var l = this.template[c ? "anchor" : "user"];
            var d = c ? g.anchor : g.user;
            var j = window.page && page.rid == d.uid;
            this.curData = b.extend({}, g, {
                userData: d,
                isAnchor: c
            });
            k = l.replace(/{avatar}/g, d.avatar).replace(/{goldIcon}/, d.goldAnchor ? '<span class="gold-anchor"></span>' : "").replace(/{alias}/g, d.alias).replace(/{rid}/g, d.rid).replace(/{ridEffect}/, ridEffectHtml(d.rid, g.roomIdEffect)).replace(/{uid}/g, d.uid).replace(/{wealthRank}/g, d.wealthRank).replace(/{province}/g, d.province || "你猜").replace(/{area}/g, d.area).replace(/{remark}/g, d.remark ? '<b></b><span class="remark">备注：' + d.remark + "</span>" : "").replace(/{lineHideClass}/, d.areaName ? "" : "line-hide").replace(/{areaName}/g, d.areaName ? '<b></b><span class="area">' + d.areaName + "</span>" : "").replace(/{userMood}/, d.mood || "").replace("{living}", d.isLive == 1 && !j ? "living" : "").replace("{followed}", g.option.isFav ? "followed" : "").replace("{badType}", g.option.isBadUser == 1 ? 2 : 1).replace("{badText}", g.option.isBadUser == 1 ? "取消拉黑" : "拉黑").replace("{enterLink}", j ? "/" + d.rid + "#roomShare" : "/" + d.rid).replace("{enterTitle}", j ? "分享" : "进入房间").replace("{enterClass}", j ? "share" : "toroom").replace("{enterTracing}", j ? "fpro_share" : "fpro_toroom").replace(/{nicknameTitle}/g, getNicknameHtml(d.nickType || d.nicknameTitle, {
                size: c ? "b" : "m"
            }));
            if (!c) {
                var h = window.newRank && newRank.isUseNew();
                k = k.replace(/{coin6Rank}/, d.coin6Rank).replace(/{richPic}/g, getRichIcon({
                    coin6rank: d.coin6Rank,
                    fid: d.uid,
                    coin6pic: d.coin6pic,
                    newCoin6rank: d.newCoin6rank,
                    newCoin6pic: d.newCoin6pic
                })).replace(/{clickAction}/, h ? "onclick=\"window.openNewRankIframe('priv', " + d.uid + ');return false;"' : 'onclick="return false;"').replace(/{oldRankClass}/g, h ? "" : "old-rank").replace(/{richIcon}/, d.rankStageIcon).replace(/{richTitle}/, function () {
                    if (h) {
                        return newRank.getRankConfig(d.newCoin6rank).t
                    } else {
                        return Rank.oldWealth[d.coin6Rank].t
                    }
                })
            }
            if (g.bgWall) {
                k = k.replace(/{bgContent}/, this._getBgContent())
            }
            if (g.badge) {
                k = k.replace(/{badgeContent}/, this._getBadgeContent())
            }
            if (g.fansGroup) {
                k = k.replace(/{fansName}/, g.fansGroup.alias || "").replace(/{fansNum}/, g.fansGroup.ppNum || 0)
            }
            if (g.guard) {
                k = k.replace(/{safeNum}/, g.guard.num)
            }
            f.html(k);
            e.removeClass("usercard-user usercard-anchor usercard-mystery");
            e.addClass(c ? "usercard-anchor" : "usercard-user");
            if (c && g.badge.num == 0) {
                f.find(".user-badge").css("display", "none")
            }
            if (g.infoCard) {
                if (g.infoCard.frame) {
                    e.find(".user-border").css({
                        background: "url(" + g.infoCard.frame + ") no-repeat",
                        backgroundSize: "cover"
                    })
                }
                if (g.infoCard.pendant) {
                    e.find(".user-pendant").html('<img src="' + g.infoCard.pendant + '">')
                }
                if (g.infoCard.avatarHead) {
                    e.find(".avatar .dress-bg").html('<img src="' + g.infoCard.avatarHead + '">')
                }
            }
            this.mountbox && this.mountbox.remove();
            this.mountbox = null;
            if (g.mount) {
                if (g.mount.icon) {
                    e.find(".user-car").html('<img src="' + g.mount.icon + '">')
                }
                if (g.mount.play) {
                    this._playMount(g.mount)
                }
            }
            if (d.mood) {
                setTimeout(function () {
                    f.find(".user-mood").addClass("user-mood-vis")
                }, 100)
            }
            e.find(".set").css("display", _puser.uid == d.uid ? "block" : "none");
            if (JSF.imr) {
                if (_puser.uid != d.uid) {
                    f.addClass("has-im")
                }
            }
            if (this.style == "win") {
                e.removeClass("usercard-load");
                this.dragable()
            } else {
                this._vCard(d.uid)
            }
            this._setBackground();
            this._setFollow()
        },
        _setMystery: function (h) {
            var g = this;
            var i;
            var e = this.card;
            var j = this.contentWrap;
            var d = h.dpType == "1";
            var f = this.template.mystery;
            var c = d ? h.anchor : h.user;
            this.curData = b.extend({}, h, {
                userData: c,
                isAnchor: false
            });
            i = f.replace(/{avatar}/g, c.avatar).replace(/{rid}/g, c.rid).replace(/{idHideClass}/g, h.elemDisplay.supMysteryId != 1 ? "mystery-id-hide" : "").replace(/{msgHideClass}/g, h.elemDisplay.atTa != 1 ? "send-msg-hide" : "");
            j.html(i);
            e.removeClass("usercard-user usercard-anchor usercard-mystery");
            e.addClass("usercard-mystery");
            if (this.style == "win") {
                e.removeClass("usercard-load");
                this.dragable()
            } else {
                this._vCard(c.uid)
            }
        },
        _playMount: function (f) {
            console.log(f);
            var e = this;
            var i = function () {
                e.mountbox && e.mountbox.css({
                    position: "absolute",
                    top: -100,
                    left: -100,
                    right: -100,
                    bottom: 0,
                    zIndex: 99,
                    pointerEvents: "none"
                })
            };
            var c = function () {
                e.mountbox && e.mountbox.remove();
                e.mountbox = null
            };
            var d = 310 + 200;
            var g = 405 + 100;
            if (window.JSF && JSF.h5gifts_lib && JSF.createjs && JSF.h5gifts_core && JSF.video_ani && document.createElement("canvas").getContext) {
                var h = "newcar_" + f.id;
                $LAB.script(JSF.h5gifts_lib).wait(function () {
                    var j = window.h5GiftsSuperLib && h5GiftsSuperLib[h];
                    if (!e.mountbox) {
                        e.mountbox = jQuery('<div class="mount-box"></div>').appendTo(e.card)
                    }
                    if (j) {
                        if (j.mp4) {
                            $LAB.script(JSF.video_ani).wait(function () {
                                var o = j.width || 940;
                                var k = j.height || 500;
                                var n = justifySize(o, k, d, g);
                                var m = {
                                    mute: true,
                                    width: n.width,
                                    height: n.height,
                                    preload: false
                                };
                                i();
                                b.extend(m, {
                                    mp4: j.mp4
                                });
                                var l = new VideoAnimation({
                                    id: h,
                                    outerBox: e.mountbox,
                                    conf: m,
                                    endBack: c
                                });
                                l.play()
                            })
                        } else {
                            $LAB.script(JSF.createjs).wait().script(JSF.h5gifts_core).wait().script(j.src).wait(function () {
                                e.mountbox.html("<canvas></canvas>");
                                var l = e.mountbox.find("canvas")[0];
                                l.style.display = "block";
                                var k = AdobeAn.getComposition(j.code);
                                var m = k.getLibrary();
                                stage = new m.Stage(l);
                                stage.enableDOMEvents(false);
                                AnPlayer.play(j.objName, j.code, {
                                    id: h,
                                    num: 1,
                                    rid: UserInfoCard.curData.userData.rid,
                                    alias: UserInfoCard.curData.userData.alias
                                }, l, stage, d, g, 0, 0, c, i)
                            })
                        }
                    }
                })
            }
        },
        _setBackground: function () {
            var c = this;
            this.scroll = new Scroll(this.contentWrap, {
                scrollWrap: ".user-bg",
                scrollContent: "ul.list",
                scrollItem: ".list li"
            });
            this.scroll.on("onScroll", function (d, f, e) {
                var g = f && f.attr("data-source");
                if (g) {
                    c.scroll.scrollWrap.addClass("user-bg-video");
                    c._loadVideo(f, g)
                } else {
                    c.scroll.scrollWrap.removeClass("user-bg-video")
                }
            });
            this.scroll.scrollTo(0)
        },
        _loadVideo: function (c, e) {
            var f = c.attr("data-image") || "";
            if (this.video) {
                this.video.destroyPlayer()
            }
            var d = (this.video = new AliVideoPlayer(c, {
                cover: f,
                source: e,
                sourceType: "mp4",
                autoplay: true,
                muted: true,
                rePlay: true,
                controlBarVisibility: "never"
            }));
            d.on("onBeforeLoad", function (g) {
                b("#" + d.id).css("opacity", 0)
            });
            d.on("onReady", function () {
                b("#" + d.id).css("opacity", 1)
            });
            d.loadPlayer()
        },
        _setFollow: function () {
            var d = this.curData;
            var c = this.card.find(".ufollow");
            new Follow(c, d.userData.uid, d.option.isFav)
        },
        _vCard: function (g) {
            var d = this.card;
            if (!g) {
                d.removeClass("usercard-user usercard-anchor")
            }
            d.removeAttr("style");
            if (this.style == "win") {
                d.addClass("usercard-win")
            } else {
                if (this.curData && this.curData.userData.uid != g) {
                    return
                }
                var c = this.btn;
                var f = {
                    x: d.width(),
                    y: d.height()
                };
                var k = {
                    x: parseInt(b(c).offset().left),
                    y: parseInt(b(c).offset().top)
                };
                var e = {
                    x: b(c).width(),
                    y: b(c).height()
                };
                var j = k.x + e.x + 5;
                var h = k.y - 80;
                d.css({
                    position: "absolute",
                    left: j,
                    top: h,
                    margin: 0
                });
                d.addClass("usercard-btn")
            }
            var i = this._getTracing("showbtn");
            d.css({
                opacity: 1,
                visibility: "visible",
                zIndex: 99999
            }).attr("data-tracing", i);
            toZhangZhi("showbtn", i)
        },
        hCard: function () {
            this.badgeWall && this.badgeWall.hidden();
            this.curData = {};
            this.scroll = this.video = null;
            this.card.css({
                opacity: 0,
                visibility: "hidden",
                zIndex: -1
            });
            if (this.style == "win") {
                this.style = ""
            }
            if (this.style == "btn") {
                this.btn = null
            }
        }
    };
    window.UserCard_win = {
        card: UserInfoCard,
        uid: 0,
        isInit: 0,
        init: function () {
            if (this.isInit) {
                return
            }
            var c = this;
            this.card.createCard(function () {
                c.isInit = 1;
                c._getCard(c.uid, c.from)
            })
        },
        getCard: function (c, d) {
            this.card.style = "win";
            this.uid = c;
            this.from = d || "";
            if (this.isInit) {
                this._getCard(c, d)
            } else {
                this.init()
            }
        },
        _getCard: function (c, g) {
            var d = this;
            var e = window.newRank && newRank.isUseNew();
            if (e) {
                newRank.onReady(function () {
                    d.card.getCard(c, "", g)
                })
            } else {
                this.card.getCard(c, "", g)
            }
        }
    };
    UserInfoCard.badgeWall = {
        ucard: UserInfoCard,
        uid: 0,
        init: function () {
            if (this.isInit) {
                return
            }
            this.isInit = 1;
            this.box = this.ucard.card.find(".badge-list");
            this.popBox = this.ucard.card.find(".badge-pop");
            this.tplList = UserInfoCard.template.badgeList;
            this.events()
        },
        events: function () {
            var d = this;
            var e = this.ucard.card;
            var c = this.box;
            e.find(".blist-close, .bpop-close").on("click", function (f) {
                f.preventDefault();
                if (b(this).hasClass("blist-close")) {
                    d.hidden()
                } else {
                    d.hidePop()
                }
            });
            c.find(".blist").on("click", "li", function () {
                var f = b(this).data("badge");
                d.showPop(f)
            })
        },
        getData: function (c) {
            var d = this;
            if (!this.isInit) {
                this.init()
            }
            if (c == this.uid) {
                this.visible();
                return
            }
            if (this.isGeting) {
                return
            }
            this.isGeting = 1;
            b.getJSON("/coop/mobile/myDress/badgeWall.php", {
                tuid: c
            }, function (e) {
                d.isGeting = 0;
                if (e.flag == "001") {
                    d.uid = c;
                    d.parse(e.content)
                } else {
                    Prompt.alert(e.content)
                }
            })
        },
        parse: function (f) {
            var d = this;
            var g = this.ucard.card;
            var c = this.box;
            var e = b("<ul></ul>");
            c.find(".blist-hd em").text(g.find(".uname .name").text());
            c.find(".blist-num").text("已获得" + f.props.length + "个");
            b.each(f.props, function (h, k) {
                var j = b(d.tplList.replace("src2", "src").replace(/{propsId}/g, k.propsId).replace(/{icon}/g, k.icon).replace(/{title}/g, k.title));
                j.data("badge", k);
                e.append(j)
            });
            c.find(".blist ul").empty().append(f.props.length > 0 ? e.children() : '<p class="no-badge">还未获得徽章</p>');
            this.visible()
        },
        visible: function () {
            this.box.css("margin-top", (-1 * this.box.height()) / 2);
            this.box.addClass("badge-list-show")
        },
        hidden: function () {
            if (!this.box) {
                return
            }
            this.box.removeClass("badge-list-show");
            this.hidePop()
        },
        showPop: function (f) {
            var e = this;
            var d = this.popBox;
            var c = [];
            c.push('<div class="pic">            <span><img src="' + f.icon + '"></span>            <em>' + f.title + "</em>        </div>");
            if (f.propsDesc) {
                c.push('<div class="item"><label>获得来源：</label><span>' + f.propsDesc + "</span></div>")
            }
            if (f.linkCustom) {
                c.push('<div class="act"><a class="to-link" href="' + f.linkCustom + '" target="_blank">查看详情</a></div>')
            }
            d.find(".bpop-bd").html(c.join(""));
            d.css("margin-top", (-1 * d.height()) / 2);
            d.addClass("badge-pop-show")
        },
        hidePop: function () {
            this.popBox.removeClass("badge-pop-show")
        }
    }
})(jQuery);
var ReMark = {
    edit: function (d, c) {
        var e = jQuery(d).parent();
        this.mark = e.find("em:eq(0)");
        var b = this.mark.html(),
            f = e.parent().find(".nameit").html();
        var a = Prompt.create({
            title: f,
            btn_sure: {
                text: "确定"
            },
            btn_cancel: {
                text: "取消"
            },
            content: '添加备注：<input type="" value="' + (b == "空" ? "" : b) + '" id="mark_val" size="25" />',
            onSubmit: function () {
                var g = jQuery.trim(jQuery("#mark_val").val());
                if (g == "") {
                    Prompt.alert("备注名不能为空");
                    return 0
                }
                jQuery.getJSON("/user/editremark.php", {
                    tuid: c,
                    remark: g
                }, function (h) {
                    if (h.flag == "001") {
                        ReMark.setMark(g)
                    } else {
                        if (h.flag == "203") {
                            Login.toLogin()
                        } else {
                            alert(h.content)
                        }
                    }
                });
                return 1
            }
        });
        jQuery("#mark_val").focus()
    },
    setMark: function (a) {
        this.mark.html(a)
    }
};
var Mediator = {
    publish: function () {
        var b = jQuery.makeArray(arguments);
        var a = b.shift();
        if (this[a]) {
            jQuery.each(this[a], function (c, d) {
                d.apply(null, b)
            })
        }
    },
    subscribe: function (a, b) {
        if (!this[a]) {
            this[a] = []
        }
        this[a].push(jQuery.proxy(b, this))
    }
};
var mobileSafe;
(function () {
    var a = jQuery;
    mobileSafe = {
        init: function () {
            var f, h;
            var g = this;
            var i;
            try {
                i = a.cookie("mobBdNotice")
            } catch (j) {}
            var b = function (e) {
                var k = e.split(":");
                return (k[0] + "年" + k[1] + "月" + k[2] + "日 " + k[3] + ":" + k[4])
            };
            if (i == "1") {
                f = '<p>手机密保提醒：<a href="/user/userinfo/uinfo.php?step=phone">免费绑定手机</a> 有效提升账号安全，快速找回密码。<a class="mobile_notice_safe" href="#">不再提醒</a> <a onclick="mobileSafe.close(); return false" href="#">以后提醒我</a></p>'
            } else {
                if (i == "2") {
                    f = '<p>该帐号曾经在其它地点登录，本机退出登录状态。请留意您的帐号安全。<a onclick="mobileSafe.close(); return false" href="#">关闭提醒</a></p>'
                } else {
                    if (i) {
                        i = decodeURIComponent(i);
                        var d = i.split("|");
                        var c = {
                            username: d[0],
                            date: b(d[1]),
                            lastip: d[2],
                            lastcity: d[3],
                            ip: d[4],
                            city: d[5]
                        };
                        f = "<p><strong>异常登录提醒：</strong><br />尊敬的用户 " + c.username + ' 您好！</p>			<p style="margin-top:8px;">您上次登录的时间：' + c.date + "<br/>登录地点IP：<em>" + c.lastip + "（" + c.lastcity + '）</em></p>			<p style="margin-top:8px;">您本次登录IP：' + c.ip + "（" + c.city + '）</p>			<p style="margin-top:8px;">您的账号可能存在被盗用的风险，为降低盗号风<br />险，建议您马上 <a href="/user/userinfo/uinfo.php?step=phone">绑定密保手机</a>有效提升账号安<br />全，还能快速找回密码。</p>			<p style="text-align:right"><a class="mobile_notice_local" href="#">下次不再提醒</a> <a onclick="mobileSafe.close(); return false" href="#">我知道了</a></p>'
                    } else {
                        return
                    }
                }
            }
            this.show(f);
            h = a("#noticeMobile");
            if (!h[0]) {
                return
            }
            h.find(".close").bind("click", function (e) {
                e.preventDefault();
                g.close()
            });
            if (h.find("a.mobile_notice_local")[0]) {
                h.find("a.mobile_notice_local").bind("click", function (e) {
                    e.preventDefault();
                    g.send("foot")
                })
            }
            if (h.find("a.mobile_notice_safe")[0]) {
                h.find("a.mobile_notice_safe").bind("click", function (e) {
                    e.preventDefault();
                    g.send("head")
                })
            }
        },
        send: function (b) {
            a.getJSON("/auth/cancelNotice.php", {
                type: b
            }, function (c) {
                if (!c.retcode) {
                    mobileSafe.delCookie("mobBdNotice");
                    mobileSafe.close()
                } else {
                    alert("操作失败，请重试或关闭")
                }
            })
        },
        show: function (c) {
            var b = a("#userPanel_index, #userPanel");
            if (!b[0]) {
                return
            }
            var d = a("<div/>", {
                id: "noticeMobile",
                "class": "notice_mobile_wrap",
                html: '<div class="inner"><div class="notice_mobile">' + c + '<em class="close" title="关闭"></em></div></div>'
            }).appendTo(document.body);
            setTimeout(function () {
                var e = b.offset(),
                    g = e.left + b.width(),
                    f = e.top;
                d.css("left", g - d.width() - 6);
                if (a("#userPanel")[0]) {
                    d.css("top", f + 8)
                } else {
                    d.css("top", f)
                }
            }, 5000)
        },
        close: function () {
            a("#noticeMobile").remove();
            mobileSafe.delCookie("mobBdNotice")
        },
        delCookie: function (b) {
            var c = a.cookie(b);
            if (c) {
                a.cookie(b, 0, {
                    expires: -1,
                    path: "/"
                })
            }
        }
    }
})();
jQuery(function () {
    mobileSafe.init()
});
var ImageOverlay;
(function () {
    var a = jQuery;
    ImageOverlay = function () {
        if (ImageOverlay.instance) {
            return ImageOverlay.instance
        }
        ImageOverlay.instance = this;
        this.initialize.apply(this, arguments)
    };
    a.extend(ImageOverlay.prototype, {
        HTML: '<div class="bigShowbox"><div class="mask"></div><div class="bigShow"><em title="关闭" class="close">关闭</em><div class="imgbox"><img /></div></div></div>',
        MAX_WIDTH: 658,
        MAX_HEIGHT: 428,
        initialize: function () {
            this.elem = this._create();
            this._attacheEvent()
        },
        show: function (f, d, b) {
            var e = this.elem;
            var c = this.elem.find("img");
            if (d && b) {
                this.scaleImage(d, b)
            } else {
                this.getImageSize(f, this.scaleImage)
            }
            c.attr("src", f);
            e.css("display", "block");
            this.justifyPos()
        },
        hide: function () {
            var c = this.elem;
            var b = c.find("img");
            c.css("display", "none");
            b.removeAttr("src");
            b.removeAttr("width");
            b.removeAttr("height")
        },
        justifyPos: function () {
            var c = this.elem.height();
            var d = a(window).scrollTop();
            var b = a(window).height();
            this.elem.css("top", Math.max(d + (b - c) / 2, 0))
        },
        scaleImage: function (e, c) {
            var g = this.MAX_WIDTH;
            var f = this.MAX_HEIGHT;
            var d = e / c;
            var b = g / f;
            var h = this.elem.find("img");
            if (e <= g && c <= f) {} else {
                if (d >= b) {
                    e = g;
                    c = e / d
                } else {
                    c = f;
                    e = c * d
                }
            }
            h.attr("width", e);
            h.attr("height", c)
        },
        getImageSize: function (c, d) {
            var b = new Image();
            b.onload = function () {
                d && d(this.width, this.height);
                this.onload = null
            };
            b.src = c
        },
        _create: function () {
            var c = document.createElement("div");
            var b;
            c.innerHTML = this.HTML;
            b = c.firstChild;
            document.body.appendChild(b);
            return a(b)
        },
        _attacheEvent: function () {
            this.justifyPos = a.proxy(this.justifyPos, this);
            this.scaleImage = a.proxy(this.scaleImage, this);
            this.elem.bind("click", a.proxy(this._clickHandler, this))
        },
        _clickHandler: function (b) {
            var c = a(b.target);
            if (c.hasClass("close")) {
                this.hide()
            }
        }
    })
})();
(function (f) {
    var g = function (n, p) {
        var m = n.split("?");
        var o = m[0] + "?platform=pc" + (m[1] ? "&" + m[1] : "");
        new WebviewCreate({
            url: o,
            title: p,
            width: 400,
            height: 650,
            pointer: false,
            extClass: "",
            effect: "webview-iframe-right",
            target: "body"
        })
    };
    var b = function (m, n) {
        if (window.WebviewCreate) {
            g(m, n)
        } else {
            if (JSF.webview) {
                $LAB.script(JSF.webview).wait(function () {
                    g(m, n)
                })
            } else {
                window.open(m)
            }
        }
    };
    var i = f("#searchForm");
    var a = i.find("#searchInput");
    var d = i.find("#searchBtn");
    var k = [];
    var e = 0;
    var l = null;
    if (!i[0]) {
        return
    }
    var j = function () {
        if (k.length < 1) {
            return
        }
        var n = k[e];
        var m = n.url;
        if (n.type == 1) {
            m = "//v.6.cn/" + n.rid
        }
        d.attr("href", m);
        d.attr("data-opentype", n.openType || 0);
        d.attr("data-title", n.title);
        a.val(n.title);
        clearTimeout(l);
        l = setTimeout(function () {
            e++;
            if (e >= k.length) {
                e = 0
            }
            j()
        }, 3000)
    };
    var h = function () {
        f.getJSON("/search.php?keyword", function (m) {
            if (m.flag == "001") {
                k = m.content;
                if (!a.is(":focus")) {
                    j()
                }
            }
        })
    };
    setTimeout(function () {
        h()
    }, 1000);
    a.on("focus", function () {
        clearTimeout(l);
        f(this).removeClass("input-def");
        if (d.attr("href")) {
            d.attr("href", "");
            f(this).val("")
        }
    }).on("blur", function () {
        if (f(this).val() == "") {
            f(this).addClass("input-def");
            j()
        }
    });
    d.on("click", function (p) {
        var o = d.attr("href");
        var m = d.attr("data-opentype");
        var n = d.attr("data-title") || "六间房";
        if (!o) {
            p.preventDefault();
            i.submit()
        } else {
            if (m == 2) {
                p.preventDefault();
                b(o, n)
            }
        }
    });
    var c = f(".js-search-keyword");
    window.searchSuggest = {
        targetInput: null,
        init: function (n) {
            if (this.isInit) {
                return
            }
            this.isInit = 1;
            var m = this;
            f.ajax({
                dataType: "text",
                url: "/js/tpls/base/search_v2.html",
                success: function (p) {
                    var o = f(p).appendTo(document.body);
                    m.box = o.filter("div.search-suggest");
                    m.recBox = m.box.find("div.search-recomm");
                    m.historyBox = m.recBox.find("div.search-history");
                    m.thinkBox = m.box.find("div.search-thinks");
                    m.thinkListBox = m.thinkBox.find("div.search-thinks-list");
                    m.getInit();
                    m.events();
                    n && n()
                }
            })
        },
        getInit: function () {
            var m = this;
            f.getJSON("/search.php?keyword", function (o) {
                if (o.flag != "001") {
                    return
                }
                var n = [];
                f.each(o.content, function (q, r) {
                    if (q >= 10) {
                        return false
                    }
                    var p = r.url;
                    if (r.type == 1) {
                        p = "//v.6.cn/" + r.rid
                    }
                    n.push('<li class="t' + (q + 1) + '">							<span class="rank">' + (q + 1) + '</span>							<a href="' + p + '" data-opentype="' + (r.openType || 0) + '" data-title="' + r.title + '" target="_blank">' + r.title + "</a>						</li>")
                });
                m.recBox.find(".search-recomm-list ul.list").html(n.join(""))
            })
        },
        events: function () {
            var m = this;
            this.historyBox.on("click", "a.clear, i.del", function (p) {
                p.stopPropagation();
                var o = f(this);
                if (o.hasClass("clear")) {
                    m.clearKeys()
                } else {
                    var n = o.parents("li").attr("data-keyword");
                    m.delKeys(n)
                }
            });
            this.recBox.find(".search-recomm-list").on("click", "a", function (r) {
                var q = f(this);
                var p = q.attr("href");
                var n = q.attr("data-opentype");
                var o = q.attr("data-title") || "六间房";
                m.hidden("recom");
                if (n == 2) {
                    r.preventDefault();
                    b(p, o)
                }
            })
        },
        visible: function (q, n) {
            var p = this;
            var o = q.parent();
            var m = n ? this.thinkBox : this.recBox;
            this.targetInput = q;
            if (!n) {
                this.getKeys()
            }
            if (!f.contains(o[0], this.box[0])) {
                this.box.appendTo(q.parent())
            }
            m.css({
                display: "block",
                top: q.outerHeight() + 5
            });
            setTimeout(function () {
                m.addClass("show")
            }, 200);
            f(document).off("click.search").on("click.search", this.testHide)
        },
        hidden: function (m) {
            if (m == "recom") {
                this.recBox.hide().removeClass("show")
            } else {
                if (m == "think") {
                    this.thinkBox.hide().removeClass("show")
                } else {
                    this.recBox.hide().removeClass("show");
                    this.thinkBox.hide().removeClass("show");
                    f(document).off("click.search", this.testHide)
                }
            }
        },
        checkInput: function (p) {
            var o = this;
            var n = p.val();
            if (!this.isInit) {
                var m = function () {
                    o.checkInput(p)
                };
                this.init(m);
                return
            }
            clearTimeout(this.timer);
            if (n == "") {
                this.hidden("think");
                this.visible(p, 0)
            } else {
                this.hidden("recom");
                this.timer = setTimeout(function () {
                    o.getSuggest(p)
                }, 200)
            }
        },
        getSuggest: function (o) {
            var n = this;
            var m = o.val();
            f.getJSON("/api/sou.php", {
                type: 1,
                wd: m
            }, function (r) {
                var p = r.content;
                if (r.flag == "001" && p.list.length > 0) {
                    var q = [];
                    f.each(p.list, function (t, u) {
                        var v = u.title.replace(m, '<em class="keyword">' + m + "</em>");
                        var s = "//v.6.cn/search.php?type=all&key=" + encodeURIComponent(u.title);
                        if (u.type == "topic") {
                            s = "//v.6.cn/search.php?type=topic&key=" + encodeURIComponent(u.title)
                        }
                        q.push('<a href="' + s + '">' + v + "</a>")
                    });
                    n.thinkListBox.html(q.join(""));
                    n.visible(o, 1)
                } else {
                    n.hidden()
                }
            })
        },
        getKeys: function () {
            var o = this;
            var m = localStorage.getItem("searchKeywords");
            var n = m ? JSON.parse(m) : [];
            var p = [];
            if (n.length > 0) {
                f.each(n, function (r, s) {
                    var q = "//v.6.cn/search.php?type=all&key=" + encodeURIComponent(s);
                    p.push('<li data-keyword="' + s + '"><a href="' + q + '">' + s + '</a><i class="del"></i></li>')
                });
                o.historyBox.find("ul.list").html(p.join(""));
                o.historyBox.show()
            } else {
                o.historyBox.hide()
            }
        },
        addKeys: function (n) {
            var m = localStorage.getItem("searchKeywords");
            var p = m ? JSON.parse(m) : [];
            var o = f.inArray(n, p);
            if (o > -1) {
                p.splice(o, 1)
            }
            p.unshift(n);
            if (p.length > 12) {
                p.splice(12)
            }
            localStorage.setItem("searchKeywords", JSON.stringify(p))
        },
        delKeys: function (n) {
            var m = localStorage.getItem("searchKeywords");
            var p = m ? JSON.parse(m) : [];
            var o = f.inArray(n, p);
            if (o > -1) {
                p.splice(o, 1)
            }
            localStorage.setItem("searchKeywords", JSON.stringify(p));
            this.getKeys()
        },
        clearKeys: function () {
            localStorage.setItem("searchKeywords", JSON.stringify([]));
            this.getKeys()
        },
        testHide: function (o) {
            var n = searchSuggest;
            var m = o.target;
            if (!f.contains(n.box[0], m) && !f.contains(n.targetInput.parent()[0], m)) {
                n.hidden()
            }
        }
    };
    c.on("keyup", function (o) {
        var m = f(o.target);
        var n = o.which;
        if (n == 40) {} else {
            if (n == 38) {} else {
                searchSuggest.checkInput(m)
            }
        }
    }).focus(function (n) {
        var m = f(n.target);
        searchSuggest.checkInput(m)
    }).blur(function (m) {})
})(jQuery);
var PicUploader;
(function () {
    var a = jQuery;
    PicUploader = function () {
        this.initialize.apply(this, arguments)
    };
    a.extend(PicUploader.prototype, {
        CALLBACK_URL: location.protocol + "//" + document.domain + "/profile/transferStation.html",
        options: {
            api: location.protocol + (location.hostname.indexOf("dev.v.6.cn") > -1 ? "//devpic.v.6.cn/api/uploadForGeneral.php" : "//pic.v.6.cn/api/uploadForGeneral.php"),
            SWF: "/apple/flashComponent/FileIO2.1.swf",
            param: {},
            onReady: null,
            onStart: null,
            onProgress: null,
            onComplete: null,
            xhr: null,
            Flash: null,
            progress: 0
        },
        fireEvent: function (c, b) {
            var d = this.options["on" + c];
            if (d) {
                d.call(this, b)
            }
        },
        initialize: function (b, c) {
            for (var e in c) {
                var f = c[e];
                this.options[e] = f
            }
            this.fileinput = a(b);
            this._callbackFun = String.uniqueID();
            this._changeHandler = a.proxy(this._changeHandler, this);
            this._back = a.proxy(this._back, this);
            this._uploadProgress = a.proxy(this._uploadProgress, this);
            this._uploadDone = a.proxy(this._uploadDone, this);
            this._revitalize();
            if (c.onProgress !== null && a.browser.msie) {
                swfobject.embedSWF(this.options.SWF + "?_=" + new Date().getTime(), this.fileinput.attr("id"), "321", "123", "10", "", {
                    type: "image",
                    userfile: this.fileinput.attr("name"),
                    url: encodeURIComponent(this.options.api),
                    id: this.fileinput.attr("id")
                }, {
                    wmode: "transparent",
                    AllowScriptAccess: "always"
                });
                this.fileinput.remove();
                this.options.Flash = swfobject.getObjectById(this.fileinput.attr("id"));
                var d = this;
                window.openBrowse = function (i, g, h) {
                    d.options.Flash.startUpload(d.options.api, d._serialize(d.options.param))
                };
                window.upLoadProgress = function (i, g, h) {
                    d.flashUpload(g, h)
                };
                window.uploadCompleteData = function (h, g) {
                    g = d.parseResponseText(g);
                    d._back(g)
                };
                window.Error = function (h, g) {
                    alert(g)
                }
            }
        },
        upload: function () {
            if (this.options.onProgress && !a.browser.msie) {
                this.progressUpload()
            } else {
                if (!this.options.onProgress) {
                    var b = this._revitalize();
                    var c = this._createForm(a.extend(this.options.param, {
                        callbackUrl: this.CALLBACK_URL,
                        callbackFun: "window.parent." + this._callbackFun
                    }));
                    c.append(b);
                    c.appendTo(document.body);
                    window[this._callbackFun] = this._back;
                    c.submit();
                    this.fireEvent("Start")
                }
            }
        },
        progressUpload: function () {
            var e = this.options.param,
                b = new FormData();
            b.append("file", this.fileinput[0].files[0]);
            for (var c in e) {
                b.append(c, e[c])
            }
            var d = (this.xhr = new XMLHttpRequest());
            d.upload.onprogress = this._uploadProgress;
            d.onreadystatechange = this._uploadDone;
            d.open("POST", this.options.api);
            d.send(b)
        },
        _uploadProgress: function (b) {
            this.fireEvent("Progress", b)
        },
        _uploadDone: function () {
            var c = this.xhr;
            if (c.readyState == 4 && c.status == 200) {
                var b = this.parseResponseText(c.responseText);
                this.fireEvent("Complete", b)
            }
        },
        flashUpload: function (c, d) {
            var b = {};
            b.lengthComputable = 1;
            b.loaded = c;
            b.total = d;
            this.fireEvent("Progress", b)
        },
        parseResponseText: function (c) {
            var b;
            var e = /\(\s*(.*?)\s*\)\;\s*$/m;
            var d = /\&json=(.*)\&/;
            if ((b = e.exec(c) || d.exec(c))) {
                return a.parseJSON(b[1])
            } else {
                return a.parseJSON(c)
            }
        },
        checkType: function (b, c) {
            var d;
            return !!(b && (d = /\.(\w+)$/.exec(b)) && c.join().toLowerCase().indexOf(d[1].toLowerCase()) > -1)
        },
        _getFlash: function () {
            return this.fileinput
        },
        _serialize: function (d) {
            var c = "";
            for (var b in d) {
                c += b + "=" + d[b] + "&"
            }
            return c.slice(0, c.length - 1)
        },
        _back: function (b) {
            this.fireEvent("Complete", b)
        },
        _changeHandler: function () {
            this.fireEvent("Ready", this.fileinput.val())
        },
        _createForm: function (c) {
            var d = a("<div/>");
            var b = '<form enctype="multipart/form-data" method="post" target="emptyIframe" action=" ' + this.options.api + '" style="display:none;">';
            a.each(c, function (f, e) {
                b += '<input type="hidden" name="' + f + '" value="' + e + '" />'
            });
            d.html(b);
            return d.find("form")
        },
        _revitalize: function () {
            var c = this.fileinput;
            var b = c.clone();
            b.on("change", this._changeHandler);
            c.replaceWith(b);
            this.fileinput = b;
            return c
        }
    })
})();
var Mask;
(function () {
    var a = jQuery;
    Mask = {
        create: function (b, c) {
            if (this.box) {
                this.remove()
            }
            this.box = a("<div/>", {
                id: "page_mask",
                "class": "promptbg"
            }).css({
                visibility: "visible",
                width: "100%",
                height: a(window).height(),
                position: "fixed",
                top: 0,
                left: 0,
                display: "block",
                zIndex: c || 999,
                background: "#000",
                opacity: (/^[0-9]+([.]{1}[0-9]{1,2})?$/.test(b) && b) || 0.3
            }).appendTo(document.body);
            a(window).bind("resize", this.set_size);
            this.box.on("click", function (d) {
                d.stopPropagation()
            })
        },
        remove: function () {
            if (!this.box) {
                return
            }
            a(window).unbind("resize", this.set_size);
            this.box.off("click");
            this.box.remove();
            this.box = null
        },
        set_size: function () {
            Mask.box.css("height", a(window).height())
        }
    }
})();
(function () {
    window.NTKF_PARAM = {
        siteid: "kf_10195",
        settingid: "kf_10195_1523246787962",
        uid: _puser.uid || "",
        uname: _puser.nickname ? _puser.nickname + "(" + _puser.uid + ")" : "",
        erpparam: jQuery.toJSON({
            refer: encodeURIComponent(location.href),
            fromuid: window.page && page.tpl == "2016" ? page.rid : 0
        })
    };
    var f = "//dl.ntalker.com/js/xn6/ntkfstat.js?siteid=" + NTKF_PARAM.siteid;
    var b = function (j) {
        this._sdk = null;
        this._callback = [];
        this._config = jQuery.extend({}, window.NTKF_PARAM, j || {});
        this._loadSdk()
    };
    b.prototype = {
        on: function (j, k) {
            this._callback.push([j, k])
        },
        trigger: function (l) {
            var m = this._callback;
            var j = [].slice.call(arguments);
            j.shift();
            for (var k = 0; k < m.length; k++) {
                if (m[k][0] == l) {
                    m[k][1] && m[k][1].apply(this, j)
                }
            }
        },
        open: function (j) {
            this._sdk.im_openInPageChat(j);
            this.trigger("onOpen")
        },
        close: function (j) {
            this.trigger("onClose")
        },
        destroy: function () {
            this._sdk = this._callback = this._config = null;
            this.trigger("onDestroy")
        },
        getConf: function () {
            return this._config
        },
        _loadSdk: function () {
            if (typeof NTKF == "undefined") {
                $LAB.script(f).wait(jQuery.proxy(this, "_sdkReady"))
            } else {
                setTimeout(jQuery.proxy(this, "_sdkReady"), 0)
            }
        },
        _sdkReady: function () {
            if (!this._sdk) {
                try {
                    this._sdk = NTKF;
                    this.trigger("onReady")
                } catch (j) {
                    console.log(j.message);
                    setTimeout(jQuery.proxy(this, "_loadSdk"), 1000)
                }
            }
        }
    };
    window.XNService = b;
    window.QIDIAN_CONFIG = {
        custom: null,
        params: {
            s: "qidian",
            ruid: window.page && page.rid ? page.rid : 0,
            platform: "web"
        }
    };
    var h = function (j) {
        if (!j) {
            return
        }
        jQuery.each(j, function (k, l) {
            window[k] = l
        })
    };
    var c = '<div class="service-list-wrap service-list-{size}">		<div class="list"></div>		<div class="load-list"></div>	</div>';
    var d = '<a href="{url}" data-id={id} id="{id}" target="_blank">{name}</a>';
    var g = ".xnservice";
    var a = "service-loading";
    var i = {
        isArrow: 0,
        size: "default",
        offsetX: 0,
        offsetY: 5,
        alignX: "center",
        alignY: "bottom",
        appendTo: document.body,
        partner: "qidian"
    };
    var e = function (l, k, j) {
        this._vis = 0;
        this._data = k || {};
        this._config = jQuery.extend({}, i, j || {});
        this.listbox = null;
        this.target = jQuery(l);
        this.target.on("click" + g, jQuery.proxy(this, "_buttonClickHanlder"))
    };
    e.prototype = {
        visible: function () {
            if (!this.listbox) {
                return this._loadList()
            }
            if (!this._vis) {
                this.setpos();
                this.listbox.css({
                    visibility: "visible",
                    zIndex: 9999
                });
                this._vis = 1;
                this._attchDocumentEvent()
            }
        },
        hidden: function () {
            if (this._vis) {
                this.listbox.css({
                    visibility: "hidden",
                    zIndex: -1
                });
                this._vis = 0;
                this._dettachDocumentEvent()
            }
        },
        toogle: function () {
            this[this._vis ? "hidden" : "visible"]()
        },
        setpos: function () {
            var q = this.target.position();
            var m = this.target.outerWidth(true);
            var k = this.target.outerHeight(true);
            var p = this.listbox.outerWidth(true);
            var l = this.listbox.outerHeight(true);
            var j = this._config.offsetX;
            var o = this._config.offsetY;
            var n = {
                top: q.top - l - o,
                bottom: q.top + k + o,
                left: q.left + j,
                right: q.left + m - p - j,
                center: q.left + m / 2 - p / 2 + j
            };
            this.listbox.css({
                top: n[this._config.alignY],
                left: n[this._config.alignX]
            })
        },
        _loadList: function () {
            var j = this;
            var k = this._config;
            var l = {
                uid: _puser.uid || "",
                t: +new Date()
            };
            if (k.partner == "qidian") {
                jQuery.extend(l, window.QIDIAN_CONFIG.params)
            }
            if (this.target.hasClass(a)) {
                return
            }
            this.target.addClass(a);
            jQuery.getJSON("/api/getCustomServiceList.php", l).done(function (o) {
                if (o.flag == "001") {
                    var n = [];
                    var m = c.replace("{size}", j._config.size);
                    jQuery.each(o.content.list, function (r, s) {
                        n.push(j._parseList(s))
                    });
                    if (j._config.isArrow) {
                        n.push('<em class="arrow"></em>')
                    }
                    if (_puser.integral > 100000) {
                        var p = window.page ? "pay-call-service-big pay-call-service-room" : "pay-call-service-small";
                        var q = "window.qimoChatLoader.openChatClick(this, null, {autoShow: true});return false;";
                        n.push('<a class="' + p + '" onClick="' + q + '">大客户经理</a>')
                    }
                    j.listbox = jQuery(m).appendTo(j._config.appendTo).on("click", "a", function (u) {
                        var s = jQuery(this);
                        var r = j._instance;
                        if (k.partner == "qidian") {} else {
                            u.preventDefault();
                            var t = s.attr("data-id");
                            if (!r) {
                                r = j._instance = new b(j._data);
                                r.on("onReady", function () {
                                    r.open(t)
                                })
                            } else {
                                r.open(t)
                            }
                        }
                        j.hidden()
                    });
                    j.listbox.find(".list").html(n.join(""));
                    j.visible();
                    j.target.removeClass(a)
                } else {
                    alert(o.content)
                }
            })
        },
        _parseList: function (j) {
            return d.replace(/{id}/g, j.id || "qidian_container" + j.group).replace("{name}", j.name).replace("{url}", j.url || "#")
        },
        _buttonClickHanlder: function (j) {
            j.preventDefault();
            if (!jQuery(j.target).hasClass(a)) {
                this.toogle()
            }
        },
        _attchDocumentEvent: function () {
            jQuery(document).on("mousedown" + g, jQuery.proxy(this, "_documentEventHanlder"))
        },
        _dettachDocumentEvent: function () {
            jQuery(document).off("mousedown" + g)
        },
        _documentEventHanlder: function (k) {
            var j = k.target;
            if (j == this.target[0] || jQuery.contains(this.target[0], j) || jQuery.contains(this.listbox[0], j) || this.listbox[0] == j) {
                return
            }
            this.hidden()
        }
    };
    window.XNServiceList = e
})();
if (location.hash == "#regTest") {
    Login.toLogin(1)
}(function () {
    var a = jQuery;
    window.ContractProgress = {
        data: {},
        init: function (c) {
            if (_puser.uid) {
                if (a.cookie("ContractDate") && !c) {
                    var b = JSON.parse(a.cookie("ContractDate"));
                    ContractProgress.data = {
                        step: b.step,
                        realname_state: b.realname_state,
                        anchordata_state: b.anchordata_state,
                        videotape: b.videotape,
                        scanning_state: b.scanning_state,
                        bank_state: b.bank_state,
                        state: b.state
                    };
                    if (ContractProgress.data.anchordata_state != 1 && ContractProgress.data.state != 0) {
                        ContractProgress.ContractText()
                    }
                } else {
                    a.ajax({
                        type: "post",
                        dataType: "json",
                        url: "/user/anchorApplyState.php",
                        success: function (f) {
                            ContractProgress.data = {
                                state: f.content.state,
                                step: f.content.step,
                                realname_state: f.content.realname_state,
                                anchordata_state: f.content.anchordata_state,
                                videotape: f.content.videotape,
                                scanning_state: f.content.scanning_state,
                                bank_state: f.content.bank_state
                            };
                            var e = window.JSON ? JSON.stringify(ContractProgress.data) : a.toJSON(ContractProgress.data);
                            var d = new Date();
                            if (f.content.state == 0) {
                                if (c) {
                                    ContractProgress.ContractText()
                                } else {
                                    d.setTime(d.getTime() + 2 * 60 * 1000);
                                    a.cookie("ContractDate", e, {
                                        expires: d,
                                        path: "/"
                                    })
                                }
                            } else {
                                if (ContractProgress.data.anchordata_state != 1 || c) {
                                    ContractProgress.ContractText()
                                }
                            }
                        }
                    })
                }
            }
        },
        ContractText: function () {
            a.ajax({
                dataType: "text",
                url: "/js/tpls/ContractProgress_v5.html",
                success: function (b) {
                    ContractProgress.box = a(b).appendTo(a(".ContractProgressBox")).eq(0);
                    ContractProgress.box.find(".cstar em").css("height", ContractProgress.data.state * 20);
                    ContractProgress.box.find(".cTitle em").css("width", ContractProgress.data.state * 20);
                    a(".ContractProgressBox").fadeIn(200);
                    ContractProgress.ContractHover();
                    ContractProgress.ContractInfo()
                }
            })
        },
        ContractHover: function () {
            ContractProgress.box.find(".ContractC").hover(function () {
                ContractProgress.box.find(".ContractBox").stop().animate({
                    left: "-239px"
                }, 400)
            }, function () {
                ContractProgress.box.find(".ContractBox").stop().animate({
                    left: "64px"
                }, 400)
            });
            ContractProgress.box.find(".conClose").click(function () {
                ContractProgress.box.css("display", "none")
            })
        },
        ContractInfo: function () {
            var b = ContractProgress;
            if (b.data.realname_state == 2) {
                b.box.find(".ContractInfo li").eq(0).find("div").html("待审核，结果将通过短信通知您")
            } else {
                if (b.data.realname_state == 4) {
                    b.box.find(".ContractInfo li").eq(0).find("div").html('未通过审核，<a href="/user/applyRealName.php" target="_balnk">点此重新认证</a>')
                } else {
                    if (b.data.realname_state == 3) {
                        b.box.find(".ContractInfo li").eq(0).attr("class", "adopt");
                        b.box.find(".ContractInfo li").eq(0).find("div").html("已完成")
                    }
                }
            }
            if (b.data.anchordata_state == 1 && b.data.realname_state != 1) {
                b.box.find(".ContractInfo li").eq(1).attr("class", "state");
                b.box.find(".ContractInfo li").eq(1).find("div").html("请填写签约资料")
            } else {
                if (b.data.anchordata_state == 2) {
                    b.box.find(".ContractInfo li").eq(1).attr("class", "adopt");
                    b.box.find(".ContractInfo li").eq(1).find("div").html("已完成");
                    b.box.find(".ContractInfo li").eq(2).attr("class", "state");
                    b.box.find(".ContractInfo li").eq(2).find("div").html("正在审核，请耐心等待")
                } else {
                    if (b.data.anchordata_state == 4) {
                        b.box.find(".ContractInfo li").eq(2).attr("class", "state");
                        b.box.find(".ContractInfo li").eq(2).find("div").html('未通过审核，<a href="/user/applyLive.php" target="_balnk">点此重新提交</a>')
                    } else {
                        if (b.data.anchordata_state == 3) {
                            b.box.find(".ContractInfo li").eq(3).attr("class", "adopt");
                            b.box.find(".ContractInfo li").eq(3).find("div").html("审核通过");
                            b.box.find(".ContractCon").css("display", "none");
                            b.box.find(".ContractPerfect").css("display", "block")
                        }
                    }
                }
            }
            if (b.data.bank_state == 1 || b.data.scanning_state == 1) {
                b.box.find(".rightPost").css("display", "block")
            }
            if (b.data.bank_state == 2) {
                b.box.find(".bankInfo li").eq(0).attr("class", "adopt");
                b.box.find(".bankInfo li").eq(0).find("div").html("已提交")
            }
            if (b.data.scanning_state == 2) {
                b.box.find(".bankInfo li").eq(1).find("div").html("审核中")
            } else {
                if (b.data.scanning_state == 4) {
                    b.box.find(".bankInfo li").eq(1).find("div").html('未通过审核，<a href="/operations/index.php?target=uploadCardCoryPic" target="_blank">重新提交</a>')
                } else {
                    if (b.data.scanning_state == 3) {
                        b.box.find(".bankInfo li").eq(1).attr("class", "adopt");
                        b.box.find(".bankInfo li").eq(1).find("div").html("已提交")
                    }
                }
            }
            if (b.data.anchordata_state == 3 && b.data.bank_state == 2 && b.data.scanning_state == 3) {
                b.box.find(".ContractCon").css("display", "none");
                b.box.find(".ContractPerfect").css("display", "none");
                b.box.find(".ContractComplete").css("display", "block")
            }
        }
    }
})();
(function (f) {
    var i = f.getUrlParam("src") || "";
    var k = i || f.cookie("srcid") || "";
    var j = i || f.cookie("_coopsrc") || "";
    window._coopsrc = j;
    if (i) {
        j = i;
        f.cookie("_coopsrc", i, {
            path: "/",
            domain: f.browser.msie ? "" : "6.cn"
        })
    }
    if (!k && !j) {
        return
    }
    var l = location.pathname;
    if (i && !/^\/\d+$/.test(l)) {
        f.getJSON("/coop/pub/coopSrcRedirect.php", {
            src: i
        }, function (n) {
            if (n.flag == "001") {
                var o = document.createElement("a");
                o.href = n.content;
                var m = o.pathname;
                if (l == m || l + "/" == m) {
                    return
                }
                location.href = n.content
            }
        })
    }
    var a = {
        _tracing: "bdEggPop",
        conf: [{
            cls: "coop-reg-0",
            link: "",
            img: "//vr1.xiu123.cn/images/coop/event/coop_bg0.png"
        }, {
            cls: "coop-reg-1",
            link: "/event/H5FirstPay/firstChargeWheel.php",
            img: "//vr1.xiu123.cn/imges/coop/coop_bg1.png"
        }, {
            cls: "coop-reg-2",
            link: "/event/chargeSignDaily/",
            img: "//vr1.xiu123.cn/imges/coop/coop_bg2.png"
        }],
        times: {
            def: [60, 300, 600],
            z9weij1096: [3, 30, 60, 300],
            "4txfzog2x5": [5, 300, 600]
        },
        filterSrcid: ["testtest", "z9weij1311", "vr9uotqbe4"],
        cur: {},
        curTime: [],
        box: null,
        getConf: function () {
            var m = this;
            this.showGameNav();
            f.getJSON("/coopgame/gamePop.php", {
                src: k
            }, function (n) {
                if (n.flag == "001") {
                    m.coopGame.visible()
                } else {
                    m.setHTML()
                }
            })
        },
        setHTML: function () {
            if (f.inArray(k, this.filterSrcid) > -1) {
                return
            }
            if (_puser.uid) {
                return
            }
            if (location.href.indexOf("/event/") >= 0) {
                return
            }
            this.cur = this.conf[0];
            this.curTime = this.times[k] || this.times.def;
            this.box = f('<div class="coop-reg ' + this.cur.cls + '">				<a href="' + this.cur.link + '" target="_blank"><img src="' + this.cur.img + '"></a>				<span class="close" data-tracing="' + this._tracing + '_close"></span>				</div>').appendTo(f(document.body));
            this.box.attr("data-tracing", this._tracing);
            this.event();
            this.visible()
        },
        event: function () {
            var m = this;
            var n = this.box;
            n.find("a, .close").on("click", function (o) {
                m.visible();
                n.fadeOut(200);
                if (f(this).hasClass("close")) {
                    f.removeCookie("srcid");
                    Login.toLogin(2, m._tracing);
                    return false
                }
                if (!m.cur.link) {
                    o.preventDefault();
                    Login.toLogin(2, m._tracing);
                    return false
                }
            })
        },
        visible: function () {
            var n = this;
            var m = this.curTime.shift();
            if (m && m > 0) {
                setTimeout(function () {
                    n.box.fadeIn(200);
                    toZhangZhi("showbtn", n._tracing)
                }, m * 1000)
            }
        },
        showGameNav: function () {
            var m = f(".header-nav li.n-game");
            if (m[0]) {
                m.css("display", "block")
            }
        },
        coopGame: {
            _tracing: "bdGamePop",
            conf: [{
                cls: "coop-reg-game1",
                link: "https://v.6.cn/coopgame/play.php?gid=140&sid=1",
                img: "//vr1.xiu123.cn/images/coop/game/reg-center1-v5.jpg"
            }, {
                cls: "coop-reg-game2",
                link: "https://v.6.cn/coopgame/play.php?gid=149&sid=1",
                img: "//vr1.xiu123.cn/images/coop/game/reg-center2-v2.jpg"
            }],
            visible: function () {
                if (location.href.indexOf("/coopgame/") > -1) {
                    return
                }
                var n = this;
                var p = this.conf[Math.floor(Math.random() * this.conf.length)];
                var o = (this.box = f('<div class="coop-reg-game coop-reg-center ' + p.cls + '"><a class="btn" href="' + p.link + '" target="_blank"><img src="' + p.img + '"></a><span class="close" data-tracing="' + this._tracing + '_close"></span></div>').appendTo(document.body));
                var m = o.find("a.btn");
                this.box.attr("data-tracing", n._tracing);
                setTimeout(function () {
                    o.fadeIn(200);
                    toZhangZhi("showbtn", n._tracing)
                }, 40 * 1000);
                m.on("click", function (q) {
                    o.fadeOut(200, function () {
                        o.remove()
                    });
                    f.removeCookie("srcid")
                });
                o.find(".close").on("click", function () {
                    f.removeCookie("srcid");
                    m.find("img").click()
                })
            }
        }
    };
    if (k) {
        a.getConf()
    }
    var c = function () {
        var m = f(".header-nav li.n-game, #menubar .menu-game-box");
        m.css("display", "none")
    };
    var g = ["z9weij1302", "lxur1tzvad", "cbh1xbjtba", "vr9uotqbe4"];
    if (f.inArray(j, g) > -1) {
        c()
    }
    var h = 0;
    var e = function (m) {
        if (h) {
            return
        }
        h = 1;
        f(".head-nav .n-game").css({
            height: 0,
            width: 0,
            "font-size": 0,
            visible: "hidden",
            overflow: "hidden"
        });
        f("#menubar .nav-game").css("display", "none");
        f(".pay-menu li.game, .pay-menu li.prop").css("display", "none");
        f("#iBody dd.game, #iBody a.bill-game").css("display", "none");
        setTimeout(function () {
            f("#getGames").find(".watch-game-item:eq(1), .watch-game-item:eq(2)").css("display", "none");
            f("#getGames .-more-rich1").css("display", "none")
        }, 2000);
        if (m == "z9weij1330") {
            return
        }
        if (location.href.indexOf("payshow.php") > -1) {
            location.href = "/channel/"
        }
        f("#userPanel .my-pay").css("display", "none");
        if (window.page && page.tpl == "2016") {
            f(".present-box .g-pay").html('<a target="_blank" href="/channel/"><em>推荐</em></a>');
            f("<style>.roomPayBox{visibility:hidden; opacity:0; display:none!important;}</style>").appendTo(document.body)
        }
    };
    var b = f.getUrlParam("src") || f.cookie("srcid");
    var d = ["z9weij1329", "z9weij1330"];
    if (f.inArray(b, d) > -1) {
        e(b)
    }
    setTimeout(function () {
        b = f.cookie("srcid");
        if (f.inArray(b, d) > -1) {
            e(b)
        }
    }, 2000)
})(jQuery);
(function (e) {
    var f = e.getUrlParam("src") || "";
    var b = localStorage.getItem("firstSrc") || "";
    var d = navigator.userAgent.toLowerCase();
    var c = /macintosh|mac os x/i.test(navigator.userAgent);
    if (!f && !b) {
        return
    }
    if (!b) {
        b = f;
        localStorage.setItem("firstSrc", f)
    }
    var a = {
        tpl: "/js/tpls/coop/pcClient_v3.html",
        init: function (h) {
            var g = this;
            e.ajax({
                dataType: "text",
                url: g.tpl,
                success: function (l) {
                    if (e(".bdClientDown")[0]) {
                        return
                    }
                    var k = e(l).appendTo(document.body).filter(".bdClientDown");
                    var i = e("#userPanel_index, #userPanel");
                    var j = k.prependTo(i);
                    g.box = j;
                    g.events();
                    if (i.hasClass("header-panel")) {
                        j.addClass("bdClientDown-home")
                    } else {
                        j.addClass("bdClientDown-room")
                    }
                    toZhangZhi("showbtn", b + "_show");
                    j.find("a.down-pc").attr("href", h.down_link).attr("data-tracing", b + "_click")
                }
            })
        },
        events: function () {
            var h = this;
            var g = this.box;
            var i = null;
            g.on("mouseenter mouseleave", function (j) {
                clearTimeout(i);
                if (j.type == "mouseenter") {
                    g.addClass("visible")
                } else {
                    i = setTimeout(function () {
                        g.removeClass("visible")
                    }, 100)
                }
            })
        },
        getData: function () {
            var g = this;
            e.getJSON("/event/promimg/miniVideo/getPcClient.php", {
                src: b
            }, function (h) {
                if (h.flag == "001") {
                    g.init(h.content)
                }
            })
        }
    };
    a.getData()
})(jQuery);
(function (c) {
    var d = "bd_pc_feeds";
    var a = jQuery.getUrlParams();
    var b = c.cookie(d);
    if (a.src && a.adch && !b) {
        c.cookie(d, JSON.stringify(a), {
            expires: 1,
            path: "/"
        })
    }
})(jQuery);
(function () {
    var a = jQuery.getUrlParams();
    if (a && a.ocpc == 1) {
        var b = ['"domain":"' + location.href.split("?")[0] + '"'];
        for (var c in a) {
            b.push('"' + c + '":"' + a[c] + '"')
        }
        var d = "{" + b.join(",") + "}";
        _d = new Date();
        _d.setTime(_d.getTime() + 7 * 24 * 60 * 60 * 1000);
        document.cookie = "ocpc=" + d + ";path=/;expires=" + _d.toGMTString()
    }
})();
(function () {
    var b = function () {
        this._events = null
    };
    b.prototype = {
        on: function (e, f) {
            var d = this.getEvents();
            d.push([e, f])
        },
        off: function (f) {
            var e = this.getEvents();
            if (f) {
                for (var d = 0; d < e.length; d++) {
                    if (e[d][0] == f) {
                        e.splice(d, 1)
                    }
                }
            } else {
                this._events = {}
            }
        },
        trigger: function (g) {
            var f = this.getEvents();
            var d = [].slice.call(arguments);
            d.shift();
            if (!f) {
                return
            }
            for (var e = 0; e < f.length; e++) {
                if (f[e][0] == g) {
                    f[e][1] && f[e][1].apply(this, d)
                }
            }
        },
        getEvents: function () {
            return this._events || (this._events = [])
        },
        _findEvent: function (d) {}
    };
    var a = {
        url: "",
        listWrap: ".list-wrap",
        emptyWrap: ".list-empty",
        loadingWrap: ".list-loading"
    };
    var c = function (d, f) {
        var e = (this.conf = jQuery.extend({}, a, f));
        d = jQuery(d);
        this.listWrap = d.find(e.listWrap);
        this.emptyWrap = d.find(e.emptyWrap);
        this.loadingWrap = d.find(e.loadingWrap);
        this.pageWrap = d.find(e.pageWrap);
        this.xhr = null;
        this.page = 0;
        this.pageTotal = 0;
        this.fromHandler = false;
        this.fromRefresh = false;
        this._callback = jQuery.proxy(this, "_callback")
    };
    jQuery.extend(c.prototype, {
        loadData: function (e, d) {
            this.page = e || 1;
            this._callback(d)
        },
        getData: function (d, f, e) {
            if (this.pageTotal > 0 && d > this.pageTotal) {
                return
            }
            if (this.page == d) {
                return
            }
            this.page = d || 1;
            this.fromHandler = f || false;
            this.fromRefresh = e || false;
            this.loading(true);
            this.request(d);
            return this
        },
        getParam: function () {
            return {
                t: +new Date()
            }
        },
        getConfig: function () {
            return this.conf
        },
        request: function (f) {
            var d = this.conf;
            var e = {
                page: f
            };
            jQuery.extend(e, this.getParam());
            this.xhr = jQuery.ajax({
                url: d.url,
                data: e,
                dataType: "json",
                success: this._callback
            })
        },
        _callback: function (d) {
            this.loading(false);
            if (!this.checkValid(d)) {
                this.invalid(d)
            } else {
                if (this.checkEmpty(d)) {
                    this.empty(d)
                } else {
                    this.nonempty(d);
                    d = this.parseData(d);
                    this.assemble(d);
                    this.trigger("dataSuccess", d);
                    this.updatePage(this.page, this.pageTotal);
                    this.trigger("pageCut", d)
                }
            }
            this.trigger("dataComplete", d);
            this.fromHandler = false;
            this.fromRefresh = false;
            this.xhr = null
        },
        checkValid: function (d) {
            return d.flag == "001"
        },
        checkEmpty: function (d) {
            return false
        },
        empty: function (d) {
            this.emptyWrap.css("display", "block")
        },
        nonempty: function (d) {
            this.emptyWrap.css("display", "none")
        },
        invalid: function (d) {
            this.trigger("dataError", d);
            console.log(d.content)
        },
        loading: function (d) {
            var e = this.loadingWrap;
            if (!d) {
                e.css("display", "none")
            } else {
                e.css("display", "block")
            }
        },
        clearList: function () {
            this.page = this.pageTotal = 0;
            this.listWrap.empty()
        },
        refresh: function (d) {
            d = typeof d == "undefined" ? this.page : d;
            this.getData(d, false, true)
        },
        cancel: function () {
            if (this.xhr) {
                this.page = 0;
                this.xhr.abort();
                this.xhr = null
            }
        },
        reset: function () {
            this.page = this.pageTotal = 0;
            this.cancel();
            this.clearList();
            if (this.pageWrap) {
                this.pageWrap.empty()
            }
        },
        parseData: function (d) {
            return d
        },
        insert: function (e, d) {
            if (d) {
                this.listWrap.prepend(e)
            } else {
                this.listWrap.append(e)
            }
        },
        assemble: function () {},
        updatePage: function (e, d) {}
    });
    jQuery.extend(c.prototype, b.prototype);
    window.SimpleEvent = b;
    window.ListLoad = c
})();
(function () {
    var a = function (b) {
        this._vis = 0;
        this._conf = b || {};
        this._nameSpace = "." + (+new Date()).toString(36);
        this.target = this._conf.target;
        this.container = this._conf.container;
        this.wrapper = this._conf.wrapper || document
    };
    jQuery.extend(a.prototype, {
        visible: function () {
            if (!this._vis) {
                this.trigger("onBeforeVisible", this);
                this._vis = 1;
                this._attchDocumentEvent();
                this.trigger("onVisible", this)
            }
        },
        hidden: function () {
            if (this._vis) {
                this.trigger("onBeforeHidden", this);
                this._vis = 0;
                this._dettachDocumentEvent();
                this.trigger("onHidden", this)
            }
        },
        toggle: function () {
            this[this._vis ? "hidden" : "visible"]()
        },
        isVisible: function () {
            return !!this._vis
        },
        _attchDocumentEvent: function () {
            jQuery(this.wrapper).on("mousedown" + this._nameSpace, jQuery.proxy(this, "_documentEventHanlder"))
        },
        _dettachDocumentEvent: function () {
            jQuery(this.wrapper).off("mousedown" + this._nameSpace)
        },
        _documentEventHanlder: function (d) {
            var c = d.target;
            var b = jQuery(this.target);
            var f = jQuery(this.container);
            if (b[0] && (c == b[0] || jQuery.contains(b[0], c))) {
                return
            }
            if (f[0] && (f[0] == c || jQuery.contains(f[0], c))) {
                return
            }
            this.hidden()
        }
    });
    jQuery.extend(a.prototype, SimpleEvent.prototype);
    window.BindDocumentEvent = a
})();
(function () {
    var a = function (c, b) {
        this.wrap = jQuery(c);
        this.conf = b || {};
        this.player = null;
        this.loadSwf()
    };
    jQuery.extend(a.prototype, {
        loadSwf: function () {
            var c = this.conf;
            var d = c.width || "100%";
            var b = c.height || "100%";
            var e = jQuery.extend({
                r: page.rid,
                isLogin: pageMessage.userCheck,
                domain: pageMessage.domain
            }, c.params || {});
            swfobject.embedSWF(c.src, c.id, d, b, "10.0", "http://v.6.cn/apple/expressInstall.swf", e, {
                wmode: "transparent",
                AllowScriptAccess: "always"
            });
            this.trigger("onLoadSwf")
        },
        getSwf: function () {
            return swfobject.getObjectById(this.conf.id)
        },
        _ready: function () {
            this.trigger("onReady")
        }
    });
    jQuery.extend(a.prototype, SimpleEvent.prototype);
    window.breakEgg = a
})();
(function (d) {
    var r = {
        vid: "",
        width: "100%",
        height: "100%",
        loop: 0,
        autoplay: 1
    };
    var k = function (t) {
        return d.getJSON("/minivideo/auth.php", {
            act: "play",
            vid: t,
            _t: +new Date()
        })
    };
    var n = function (t) {
        return d.ajax({
            type: "get",
            url: "/v27.php",
            data: {
                vid: t
            },
            dataType: "xml"
        })
    };
    var g = {
        controls: true,
        muted: false,
        preload: false
    };

    function e(u, t) {
        this.id = u;
        this.conf = d.extend({}, r, g, t || {});
        this.xhr = null;
        if (this.conf.src) {
            this.load()
        } else {
            setTimeout(d.proxy(this, "getData"), 0)
        }
    }
    d.extend(e.prototype, {
        videoType: "video/mp4",
        videoProps: ["id", "width", "height", "src", "poster", "controls", "loop", "autoplay", "muted", "preload", "allow"],
        getData: function () {
            var t = this.conf.vid;
            this.xhr = n(t).done(d.proxy(this, "_getDataBack"))
        },
        _getDataBack: function (u) {
            var t = d(u);
            d.extend(this.conf, {
                src: t.find("mp4").text() || t.find("file").text(),
                poster: t.find("pic").text() || "",
                errorMsg: t.find("err").text() || ""
            });
            this.load()
        },
        load: function () {
            var w = this.id;
            var v = d("#" + w);
            var t = d.extend(this.conf, {
                id: (+new Date()).toString(36),
                type: "video"
            });
            if (!t.src) {
                t.errorMsg = "视频播放失败，格式错误"
            }
            if (t.errorMsg) {
                v.html('<div class="video-error-msg"><p>' + t.errorMsg + "</p></span></div>");
                this.trigger("onError", t, "resError", t.errorMsg)
            } else {
                var u = [];
                d.each(this.videoProps, function (y, x) {
                    if (t[x]) {
                        u.push(x + '="' + t[x] + '"')
                    }
                });
                v.html("<video " + u.join(" ") + ">您的浏览器不支持video播放，请升级您的浏览器</video>");
                this.video = v.find("video");
                this.trigger("onReady", t)
            }
        },
        play: function () {
            this.video && this.video[0].play()
        },
        setMute: function (t) {
            this.video && (this.video[0].muted = !!t)
        }
    });
    var q = {};
    var j = function () {
        return window.swfobject ? swfobject.ua.pv[0] : 0
    };

    function b(v, t) {
        this.id = v;
        this.conf = d.extend({}, r, q, t || {});
        var u = this;
        $LAB.script(JSF.swf).wait(function () {
            setTimeout(function () {
                u.load()
            }, 0)
        })
    }
    d.extend(b.prototype, {
        swfPath: "/apple/player/videoplayer/xiu_vp3.2.swf",
        load: function () {
            var x = this;
            var y = this.id;
            var v = d.extend(this.conf, {
                type: "flash"
            });
            var w = v.width;
            var t = v.height;
            var u = j();
            if (u > 0) {
                swfobject.embedSWF(this.swfPath, y, w, t, "10.1", "/apple/expressInstall.swf", v, {
                    wmode: "Opaque",
                    bgcolor: "#000000",
                    allowFullScreen: true,
                    allowscriptaccess: "always"
                });
                window.ready = function () {
                    console.log("flash callback");
                    x.video = swfobject.getObjectById(y);
                    x.trigger("onReady", v);
                    window.ready = null
                }
            } else {
                this.trigger("onError", v, "flashUnInstall")
            }
        },
        play: function () {
            try {
                this.video.resume()
            } catch (t) {}
        }
    });
    d.extend(e.prototype, SimpleEvent.prototype);
    d.extend(b.prototype, SimpleEvent.prototype);

    function c(v, t, u) {
        this.id = v;
        this.player = null;
        if (this.testH5()) {
            this.player = new e(v, t);
            this.player.on("onError", function (x, w) {
                if (w == "resError") {
                    this.player = new b(v, u)
                }
            })
        } else {
            this.player = new b(v, u)
        }
    }
    d.extend(c.prototype, {
        testH5: function () {
            return !!document.createElement("video").canPlayType
        },
        handlerError: function (t, u) {}
    });
    window.VideoPlayer = c;
    window.H5VideoPlayer = e;
    window.FlashVideoPlayer = b;
    var h = {
        id: null,
        width: "100%",
        height: "100%",
        autoplay: true,
        cover: "//vr1.xiu123.cn/imges/live/CSSIMG/mini_video_cover.png",
        rePlay: false,
        source: "",
        showBarTime: 1000,
        skinRes: "//vr1.xiu123.cn/imges/live/events/mini_video/skin",
        controlBarVisibility: "hover",
        useH5Prism: false,
        useFlashPrism: false
    };
    var o = "//g.alicdn.com/de/prismplayer/2.9.3/aliplayer-h5-min.js";
    var a = "//g.alicdn.com/de/prismplayer/2.9.3/skins/default/aliplayer-min.css";
    var f = {
        skinLayout: [{
            name: "bigPlayButton",
            align: "cc"
        }, {
            name: "loading",
            align: "cc"
        }, {
            name: "controlBar",
            align: "blabs",
            x: 0,
            y: 0,
            children: [{
                name: "progress",
                align: "tlabs",
                x: 0,
                y: 0
            }, {
                name: "playButton",
                align: "tl",
                x: 15,
                y: 11
            }, {
                name: "nextButton",
                align: "tl",
                x: 10,
                y: 11
            }, {
                name: "timeDisplay",
                align: "tl",
                x: 10,
                y: 5
            }, {
                name: "fullScreenButton",
                align: "tr",
                x: 10,
                y: 11
            }, {
                name: "streamButton",
                align: "tr",
                x: 10,
                y: 11
            }, {
                name: "volume",
                align: "tr",
                x: 10,
                y: 11
            }]
        }, {
            name: "fullControlBar",
            align: "tlabs",
            x: 0,
            y: 0,
            children: [{
                name: "fullTitle",
                align: "tl",
                x: 25,
                y: 6
            }, {
                name: "fullNormalScreenButton",
                align: "tr",
                x: 24,
                y: 13
            }, {
                name: "fullTimeDisplay",
                align: "tr",
                x: 10,
                y: 12
            }, {
                name: "fullZoom",
                align: "cc"
            }]
        }]
    };
    var p = "//g.alicdn.com/de/prismplayer/2.8.7/aliplayer-flash-min.js";
    var m = "//g.alicdn.com/de/prismplayer/2.8.7/json/json.min.js";
    var s = {
        skinLayout: [{
            name: "bigPlayButton",
            align: "cc"
        }, {
            name: "loading",
            align: "cc"
        }, {
            name: "controlBar",
            align: "blabs",
            x: 0,
            y: 0,
            children: [{
                name: "progress",
                align: "tlabs",
                x: 0,
                y: 0
            }, {
                name: "playButton",
                align: "tl",
                x: 15,
                y: 26
            }, {
                name: "nextButton",
                align: "tl",
                x: 10,
                y: 26
            }, {
                name: "timeDisplay",
                align: "tl",
                x: 10,
                y: 24
            }, {
                name: "fullScreenButton",
                align: "tr",
                x: 10,
                y: 25
            }, {
                name: "streamButton",
                align: "tr",
                x: 10,
                y: 23
            }, {
                name: "volume",
                align: "tr",
                x: 10,
                y: 25
            }]
        }, {
            name: "fullControlBar",
            align: "tlabs",
            x: 0,
            y: 0,
            children: [{
                name: "fullTitle",
                align: "tl",
                x: 25,
                y: 6
            }, {
                name: "fullNormalScreenButton",
                align: "tr",
                x: 24,
                y: 13
            }, {
                name: "fullTimeDisplay",
                align: "tr",
                x: 10,
                y: 12
            }, {
                name: "fullZoom",
                align: "cc"
            }]
        }]
    };
    var i = function () {
        var t = d.browser.msie && d.browser.version < 10;
        var u = d.browser.msie && d.browser.version < 8;
        return u ? "no-support" : t ? "flash" : "h5"
    };

    function l(u, t) {
        this.wrap = d(u);
        this.id = "_mvideo_" + String.uniqueID();
        this.callbacks = [];
        this.conf = {};
        this.player = null;
        t && this.setConfig(t)
    }
    d.extend(l.prototype, {
        checkSupport: i,
        setConfig: function (t) {
            this.conf = d.extend({}, r, t || {})
        },
        loadPlayer: function (t) {
            var u = i();
            if (u == "no-support") {
                this.wrap.html("您当前的浏览器不支持播放该视频，请升级您的浏览器！（支持IE8以上版本及其它主流浏览器）");
                this.trigger("onNoSupport")
            } else {
                if (t) {
                    this.destroyPlayer();
                    this.setConfig(t)
                }
                if (u == "h5") {
                    this._loadH5()
                } else {
                    this._loadFlash()
                }
            }
        },
        _loadH5: function () {
            d.extend(this.conf, {
                type: "h5",
                src: o,
                buttonConfig: f
            });
            this._loadH5Css();
            this._getSourcePath()
        },
        _loadH5Css: function () {
            var u = "__ali_h5_stylesheet__";
            if (d("#" + u).length == 0) {
                var t = d('<link type="text/css" rel="stylesheet" />').attr({
                    id: u,
                    href: a
                });
                d("head")[0].appendChild(t[0])
            }
        },
        _loadFlash: function () {
            d.extend(this.conf, {
                type: "flash",
                src: p,
                buttonConfig: s
            });
            var t = j();
            if (t > 0) {
                $LAB.script(m).wait(d.proxy(this, "_getSourcePath"))
            } else {
                this.trigger("onError", conf, "flashUnInstall")
            }
        },
        _getSourcePath: function () {
            var v = this;
            var t = this.conf;
            var u = this.wrap;
            if (!t.sourceType || t.sourceType == "vid") {
                k(t.vid).done(function (w) {
                    if (w.flag == "001") {
                        d.extend(t, {
                            source: w.content.mp4url
                        });
                        v._load()
                    } else {
                        d.extend(t, {
                            errorMsg: w.content
                        });
                        u.html('<p class="video-error-msg>' + w.content + "</p>");
                        v.trigger("onError", t, "resError", t.errorMsg)
                    }
                })
            } else {
                if (t.sourceType == "evid") {
                    n(t.vid).done(function (x) {
                        var w = d(x);
                        d.extend(t, {
                            source: w.find("mp4").text(),
                            cover: w.find("pic").text() || "",
                            errorMsg: w.find("err").text() || ""
                        });
                        if (t.errorMsg) {
                            u.html('<p class="video-error-msg>' + t.errorMsg + "</p>");
                            v.trigger("onError", t, "resError", t.errorMsg)
                        } else {
                            v._load()
                        }
                    })
                } else {
                    if (t.sourceType && t.source) {
                        v._load()
                    }
                }
            }
        },
        _getPlayerConfig: function () {
            var t = this.conf;
            var u = d.extend({}, h);
            for (var v in u) {
                if (typeof t[v] != "undefined") {
                    u[v] = t[v]
                }
            }
            u.id = this.id;
            if (t.replay || t.loop) {
                u.rePlay = true
            }
            if (t.controlBarVisibility == "never") {
                t.buttonConfig.skinLayout && t.buttonConfig.skinLayout.splice(2, 1)
            }
            d.extend(u, t.buttonConfig);
            return u
        },
        _load: function () {
            var v = this;
            var w = this.id;
            var u = this.wrap.html('<div id="' + w + '"></div>');
            var t = this._getPlayerConfig();
            this.trigger("onBeforeLoad", w);
            $LAB.script(this.conf.src).wait(function () {
                var y = new Aliplayer(t);
                y.on("ready", d.proxy(v, "_playerReady", y));
                y.on("error", d.proxy(v, "_playerError"));
                var z = v.callbacks;
                if (z.length > 0) {
                    for (var x = 0; x < z.length; x++) {
                        y.on(z[x][0], z[x][1])
                    }
                }
            })
        },
        _playerReady: function (t) {
            this.player = t;
            if (this.conf.muted) {
                t.setVolume(0)
            }
            this.trigger("onReady")
        },
        _playerError: function (t) {
            this.trigger("onError", this.conf, t.errorCode, t.errorMsg)
        },
        getConfig: function () {
            return this.conf
        },
        getPlayer: function () {
            return this.player
        },
        listen: function (t, u) {
            if (this.player) {
                this.player.on(t, u)
            } else {
                this.callbacks.push([t, u])
            }
        },
        play: function () {
            try {
                this.player.play()
            } catch (t) {}
        },
        pause: function () {
            try {
                this.player.pause()
            } catch (t) {}
        },
        destroyPlayer: function () {
            try {
                this.player.pause();
                this.player.dispose();
                this.player = null;
                this.wrap.empty()
            } catch (t) {}
        }
    });
    d.extend(l.prototype, SimpleEvent.prototype);
    window.AliVideoPlayer = l
})(jQuery);
(function () {
    var a = {
        ico: "user-cloneico",
        src: "//vr1.xiu123.cn/images/room2019/clone_avatar.jpg",
        valid: function (b) {
            return b >= 1700000000 && b < 1800000000
        },
        validBID: function (c) {
            var b = /\D?(951[5|6])\D?/g.exec(c);
            return b ? b[1] : null
        }
    };
    window.clonesConfig = a
})();
(function (a) {
    window.SAni = function () {
        this.initialize.apply(this, arguments)
    };
    a.extend(SAni.prototype, {
        t: 0,
        cur: 0,
        stopFrame: -100,
        loadCount: 0,
        initialize: function (f, e, d, c) {
            this.elm = a(f);
            this.kf = {};
            this.cur = 0;
            this.loadCount = 0;
            this.stopFrame = -100;
            this.imgs = e || [];
            this.cNum = this.imgs.length - 1;
            this.interval = 1000 / (d || 60);
            this.loadBack = c;
            window._requestAnimationFrame = window.requestAnimationFrame || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame || window.msRequestAnimationFrame;
            window._cancelAnimationFrame = window.cancelAnimationFrame || window.mozCancelAnimationFrame || window.webkitCancelAnimationFrame || window.msCancelAnimationFrame;
            this._tick = a.proxy(this.__tick, this);
            this._img = a('<img src="' + e[0] + '"/>').appendTo(this.elm);
            this.imgCount = 0;
            for (var b = 0; b < this.imgs.length; b++) {
                if (a.type(this.imgs[b]) == "number") {
                    continue
                } else {
                    this.imgCount++;
                    this.loadImg(this.imgs[b])
                }
            }
        },
        loadImg: function (d) {
            var b = this,
                c = new Image();
            c.onload = function () {
                b.loadCount++;
                if (b.loadCount >= b.imgCount) {
                    b.onLoad()
                }
            };
            c.src = d
        },
        onLoad: function () {
            this.loaded = true;
            if (this.loadBack) {
                this.loadBack()
            }
        },
        goToAndStop: function (b) {
            this.stop(false);
            this._img.attr("src", this.imgs[b])
        },
        stop: function (b, c) {
            if (b === false) {
                if (window._requestAnimationFrame) {
                    window._cancelAnimationFrame(this.t)
                } else {
                    clearTimeout(this.t)
                }
                c && c(this.elm)
            } else {
                this.callback = c;
                this.stopFrame = b
            }
            return this
        },
        play: function (b) {
            this.stopFrame = -100;
            this.cur = b || 0;
            this.then = new Date().getTime();
            this.stop(false);
            this._tick();
            return this
        },
        kf: {},
        clearKf: function () {
            this.kf = {};
            return this
        },
        addKf: function (b, c) {
            this.kf[b] = c;
            return this
        },
        _next: function () {
            this.cur++;
            var b = this.imgs[this.cur];
            if (this.stopFrame > -1) {
                if (a.type(b) == "number") {
                    if (this.cur < this.stopFrame) {
                        this.cur++
                    } else {
                        this.cur = b
                    }
                }
            } else {
                if (a.type(b) == "number") {
                    this.cur = b
                }
            }
            this._img.attr("src", this.imgs[this.cur]);
            if (this.kf[this.cur]) {
                this.kf[this.cur](this.elm)
            }
            if (this.cur == this.stopFrame) {
                this.callback && this.callback(this.elm);
                this.stop(false)
            }
        },
        __tick: function () {
            if (window._requestAnimationFrame) {
                this.t = window._requestAnimationFrame(this._tick);
                now = new Date().getTime();
                delta = now - this.then;
                if (delta > this.interval) {
                    this.then = now - (delta % this.interval);
                    this._next()
                }
            } else {
                this.t = setTimeout(this._tick, this.interval);
                this._next()
            }
        }
    })
})(jQuery);
(function () {
    var a = jQuery;
    window.FrameAni = function () {
        this.initialize.apply(this, arguments)
    };
    a.extend(FrameAni.prototype, {
        ft: 0,
        initialize: function (b) {
            this.elm = a(b.elm);
            this.keyFrames = {};
            this.eventsTick = {};
            this.currentFrameIndex = -1;
            this.imageLoadCount = 0;
            this.stopFrameIndex = -100;
            this.interval = 1000 / (b.fps || 60);
            this.onReady = b.onReady;
            if (!window._sixRequestAnimationFrame) {
                window._sixRequestAnimationFrame = window.requestAnimationFrame || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame || window.msRequestAnimationFrame;
                window._sixCancelAnimationFrame = window.cancelAnimationFrame || window.mozCancelAnimationFrame || window.webkitCancelAnimationFrame || window.msCancelAnimationFrame
            }
            this._tick = a.proxy(this.__tick, this);
            if (a.type(b.items) == "number") {
                this._next = this._nextEmpty;
                this._setCur = this._setCurEmpty;
                this.emptyItems = new Array(b.items);
                this.emptyCount = b.items;
                if (this.onReady) {
                    this.onReady(this)
                }
            } else {
                this._next = this._nextImage;
                this._setCur = this._setCurImage;
                this.images = b.items;
                this.imageCount = this.images.length;
                this._imgElm = a("<img />").appendTo(this.elm);
                for (var c = 0; c < this.images.length; c++) {
                    this.loadImage(this.images[c])
                }
            }
        },
        loadImage: function (d) {
            var b = this,
                c = new Image();
            c.onload = function () {
                b.imageLoadCount++;
                if (b.imageLoadCount >= b.imageCount) {
                    b.loadImageBack()
                }
            };
            c.src = d
        },
        loadImageBack: function () {
            this.loaded = true;
            if (this.onReady) {
                this.onReady(this)
            }
        },
        addEventTick: function (b, c) {
            this.eventsTick[b] = c
        },
        removeEventTick: function (b) {
            if (b) {
                if (this.eventsTick[b]) {
                    delete this.eventsTick[b]
                }
            } else {
                this.eventsTick = {}
            }
        },
        addKeyFrame: function (d, c) {
            var b = this;
            this.keyFrames[d] = function () {
                c(b)
            };
            return this
        },
        removeKeyFrame: function (b) {
            if (b > -1) {
                if (this.keyFrames[b]) {
                    delete this.keyFrames[b]
                }
            } else {
                this.keyFrames = {}
            }
        },
        _nextImage: function () {
            this.currentFrameIndex++;
            if (this.currentFrameIndex >= this.imageCount) {
                this.currentFrameIndex = 0
            }
            this._setCurImage(this.currentFrameIndex);
            for (var b in this.eventsTick) {
                this.eventsTick[b](this.currentFrameIndex)
            }
        },
        _setCurImage: function (c) {
            this._imgElm.attr("src", this.images[c]);
            var b = this.keyFrames[c];
            if (b) {
                b(this.elm)
            }
            if (c == this.stopFrameIndex) {
                this.callback && this.callback(this.elm);
                this.stop(false);
                return
            }
        },
        _nextEmpty: function () {
            this.currentFrameIndex++;
            if (this.currentFrameIndex >= this.emptyCount) {
                this.currentFrameIndex = 0
            }
            this._setCurEmpty(this.currentFrameIndex);
            for (var b in this.eventsTick) {
                this.eventsTick[b](this.currentFrameIndex)
            }
        },
        _setCurEmpty: function (c) {
            var b = this.keyFrames[c];
            if (b) {
                b(this.elm)
            }
            if (c == this.stopFrameIndex) {
                this.callback && this.callback(c);
                this.stop(false);
                return
            }
        },
        __tick: function () {
            if (window._sixRequestAnimationFrame) {
                this.ft = window._sixRequestAnimationFrame(this._tick);
                now = new Date().getTime();
                delta = now - this.then;
                if (delta > this.interval) {
                    this.then = now - (delta % this.interval);
                    this._next()
                }
            } else {
                this.ft = setTimeout(this._tick, this.interval);
                this._next()
            }
        },
        play: function (b) {
            this.stopFrameIndex = -100;
            this.currentFrameIndex = a.type(b) == "number" ? b : this.currentFrameIndex;
            this.then = new Date().getTime();
            this.stop(false);
            this._tick();
            return this
        },
        rePlay: function () {
            this.stopFrameIndex = -100;
            this.then = new Date().getTime();
            this.stop(false);
            this._tick();
            return this
        },
        gotoAndPlay: function (b) {
            this._setCur(b);
            this.currentFrameIndex = b - 1;
            this.play(b)
        },
        pause: function (b) {
            this.stop(false, b);
            return this
        },
        stop: function (c, b) {
            if (c === false) {
                if (window._sixRequestAnimationFrame) {
                    window._sixCancelAnimationFrame(this.ft)
                } else {
                    clearTimeout(this.ft)
                }
                b && b(this.currentFrameIndex)
            } else {
                this.callback = b;
                this.stopFrameIndex = c
            }
            return c
        },
        gotoAndStop: function (b) {
            this.stopFrameIndex = b;
            this._setCur(b)
        }
    });
    window.getFrameAni = function (e, b) {
        b = b || {};
        var f = b.count;
        var d = a(e);
        var h = [];
        var g = b.path;
        if (!f || !g) {
            console.log("参数错误！");
            return
        }
        for (var c = 1; c <= f; c++) {
            h.push(g + c + ".png")
        }
        return new FrameAni({
            elm: d,
            fps: b.fps || 10,
            items: h,
            onReady: b.onReady || null
        })
    }
})();
(function (e) {
    var f = _puser.uid || "YOUKE";
    var w = "_EVENT_POP_CONFIG_" + f;
    var c = "_EVENT_POP_DATA_" + f;
    var n = "_EVENT_POP_DATA_320_" + f;
    var k = "_EVENT_POP_DATA_322_" + f;
    var z = location.search.indexOf("eventPopDebug") > -1;
    var t = {
        room_right_bottom: "left",
        room_right_bottom_2: "right",
        room_left_top: "custom",
        room_right_top: "custom",
        room_mid_bottom_2: "custom",
        room_free: "custom"
    };
    var g;
    if (z) {
        g = window.console ? console.log : e.noop
    } else {
        g = e.noop
    }
    var i = function (B) {
        var C = location.pathname;
        var A = C;
        if (C == "/") {
            A = window.VIA_PAGEID || "index"
        } else {
            if (/^\/\d+$/.test(C)) {
                A = "room";
                if (B && window.page) {
                    if (page.roomType == "voice") {
                        A = "room_voice"
                    } else {
                        if (page.tpl == "events") {
                            A = "room_events"
                        } else {
                            if (page.tpl == "2016" && page.multiVideo / 1) {
                                A = "room_multi_video"
                            } else {
                                if (page.tpl == "2016") {
                                    A = "room_personal"
                                }
                            }
                        }
                    }
                }
            } else {
                if (/^\/f\/\d+$/.test(C)) {
                    A = "room";
                    if (B) {
                        A = "room_family"
                    }
                } else {
                    A = C
                }
            }
        }
        return A
    };
    var m = i();
    var v = i(true);
    var b = function (C) {
        var B = {
            all: ["room_personal", "room_voice", "room_multi_video", "room_events", "room_family"],
            videoRoom: ["room_personal"],
            voiceRoom: ["room_voice"],
            videoLive: ["room_multi_video"],
            eventRoom: ["room_events"],
            familyRoom: ["room_family"]
        };
        var A = false;
        if (window.page) {
            e.each(C || [], function (E, D) {
                if (e.inArray(v, B[D]) > -1) {
                    A = true;
                    return false
                }
            })
        }
        return A
    };
    var h = function (C) {
        var A;
        var B = window.page || {};
        switch (C) {
            case "all":
                A = true;
                break;
            case "user":
                A = _puser.uid != B.rid;
                break;
            case "anchor":
                A = _puser.uid == B.rid;
                break;
            default:
                A = true;
                break
        }
        return A
    };
    g("用户活动配置本地存储键名：" + w);
    g("用户活动历史本地存储键名：" + c, n, k);
    g("页面类型：" + v);
    var u = {
        test: function () {
            if (window.localStorage && window.JSON) {
                var C = "__testLocal__";
                try {
                    localStorage.setItem(C, JSON.stringify({
                        testdata: "true"
                    }));
                    var B = localStorage.getItem(C);
                    if (JSON.parse(B)) {
                        localStorage.removeItem(C);
                        return true
                    }
                    return false
                } catch (A) {
                    return false
                }
            }
            return false
        },
        get: function (A) {
            if (this.test()) {
                var B = localStorage.getItem(A);
                if (B) {
                    return JSON.parse(B)
                }
            }
        },
        set: function (A, B) {
            if (this.test()) {
                localStorage.setItem(A, JSON.stringify(B))
            }
        },
        remove: function (A) {
            this.test() && localStorage.removeItem(A)
        },
        clear: function () {
            if (this.test) {
                localStorage.clear()
            }
        }
    };
    var x = function (A) {
        this.regularData = null;
        this.customData = null;
        this.configData = A;
        this.ename = A.eventname
    };
    e.extend(x.prototype, {
        initialize: function () {
            var C = this;
            var B = +new Date();
            var A = this.configData;
            e.each(A.con, function (D, E) {
                if (m == E.page) {
                    if (A.stm * 1000 > B) {
                        g(A.eventname + "活动未开启");
                        C.trigger("onNotStart", C)
                    } else {
                        if (A.etm * 1000 < B) {
                            g(A.eventname + "活动已结束");
                            C.trigger("onEnd", C)
                        } else {
                            C._setCustomData();
                            C._setRegularData(E);
                            C.start()
                        }
                    }
                    return false
                }
            })
        },
        getConfig: function () {
            return this.configData
        },
        start: function () {
            var A = this.regularData.delay_tm;
            clearTimeout(this.stm);
            this.stm = setTimeout(e.proxy(this, "showPop"), A * 1000);
            this.trigger("onStart", this)
        },
        update: function (A) {
            this.trigger("onUpdate", A)
        },
        showPop: function () {
            var A = this.configData;
            var B = this.regularData;
            var D = B.show_tm;
            var C = B.step_tm;
            if (!this.inValid()) {
                return
            }
            if (D > 0) {
                clearTimeout(this.htm);
                this.htm = setTimeout(e.proxy(this, "hidePop"), D * 1000)
            }
            if (C > 0) {
                clearTimeout(this.ltm);
                this.ltm = setTimeout(e.proxy(this, "showPop"), C * 1000)
            }
            this._updateCustomData();
            if (A.group && !y.validRoomGroupLimit(A.group)) {
                return
            }
            this.trigger("onVisible", this)
        },
        hidePop: function () {
            clearTimeout(this.stm);
            clearTimeout(this.htm);
            this.trigger("onHidden")
        },
        destroy: function () {
            if (this.ename) {
                this.trigger("onDestroy", this.conf);
                this.hidePop()
            }
            clearTimeout(this.stm);
            clearTimeout(this.ltm);
            this.off();
            this.ename = null
        },
        getRegularData: function () {
            return this.regularData
        },
        _setRegularData: function (A) {
            this.regularData = A
        },
        getCustomData: function () {
            return this.customData
        },
        _setCustomData: function () {
            var B = this._getLocalData();
            if (B.ptm > 0) {
                var A = function (E, D) {
                    return Math.floor((D - E) / 1000 / 3600 / 24)
                };
                var C = A(B.ptm, +new Date());
                if (C > 0) {
                    g(this.configData.eventname + "重置显示次数");
                    B = {
                        st: 0,
                        ptm: 0
                    }
                }
            }
            this.customData = B
        },
        removeCustomData: function () {
            u.remove(this.configData.storageKey)
        },
        _getLocalData: function () {
            var A = this.configData;
            if (u.test()) {
                var B = this.ename;
                var C = u.get(A.storageKey);
                if (C && C[B]) {
                    return C[B]
                }
                return {
                    st: 0,
                    ptm: 0
                }
            } else {
                return {
                    st: A.show_times || 0,
                    ptm: 0
                }
            }
        },
        _updateCustomData: function () {
            this.customData.st++;
            this.customData.ptm = +new Date();
            var B = this.ename;
            var A = this.configData;
            if (u.test()) {
                var D = u.get(A.storageKey);
                var C = {};
                C[B] = this.customData;
                D = e.extend(D || {}, C);
                u.set(A.storageKey, D)
            } else {
                e.post("/api/postEventPopLog.php", {
                    eventname: B,
                    clienttype: 1
                }, "json")
            }
        },
        inValid: function () {
            var D = +new Date();
            var E = this.customData;
            var B = this.configData;
            var C = this.regularData;
            if (E.st >= B.dayliy_times) {
                g("活动：" + B.eventname);
                g("错误信息：显示次数超出");
                this.trigger("onFailed", "001");
                return false
            }
            if (C.page == "room" && window.page) {
                if (!b(C.tpltype)) {
                    g("活动：" + B.eventname);
                    g("错误信息：房间类型错误");
                    this.trigger("onFailed", "003");
                    return false
                }
                if (!h(C.role)) {
                    g("活动：" + B.eventname);
                    g("错误信息：角色没有权限显示");
                    this.trigger("onFailed", "002");
                    return false
                }
            }
            var A = B.group;
            return true
        }
    }, SimpleEvent.prototype);
    var s = function (B, A) {
        this.wrap = B;
        this.conf = A || {}
    };
    e.extend(s.prototype, {
        initialize: function () {
            var C = this;
            var B = +new Date();
            var A = this.conf;
            if (window.page) {
                if (A.stm * 1000 > B) {
                    g(A.eventname + "创可贴未开启");
                    C.trigger("onNotStart", C)
                } else {
                    if (A.etm * 1000 < B) {
                        g(A.eventname + "创可贴已结束");
                        C.trigger("onEnd", C)
                    } else {
                        g(A.eventname + "创可贴显示");
                        this.visible()
                    }
                }
            }
        },
        getConfig: function () {
            return this.conf
        },
        update: function (A) {
            this.trigger("onUpdate", A)
        },
        visible: function () {
            if (!this.inValid()) {
                return
            }
            this.wrap.init();
            this.wrap.insertToList(this.conf);
            this.trigger("onVisible", this.conf)
        },
        insertToWrap: function (A, B) {
            return this.wrap.insert(this.conf.id, A, B)
        },
        destroy: function () {
            if (this.wrap) {
                this.trigger("onDestroy", this.conf);
                this.wrap.remove(this.conf.id)
            }
            this.off();
            this.wrap = this.conf = null
        },
        inValid: function () {
            var B = +new Date();
            var A = this.conf;
            if (window.page) {
                if (!b(A.tpltype)) {
                    g("活动：" + A.eventname);
                    g("错误信息：房间类型错误");
                    this.trigger("onFailed", "003");
                    return false
                }
                if (!h(A.role)) {
                    g("活动：" + A.eventname);
                    g("错误信息：角色没有权限显示");
                    this.trigger("onFailed", "002");
                    return false
                }
                return true
            }
            return false
        }
    }, SimpleEvent.prototype);
    var j = {
        yiyuancu: {
            fname: "yiyuancuResult"
        },
        yiyuancuPc: {
            fname: "yiyuancuResult"
        },
        yiyuancuNew: {
            fname: "yiyuancuNewResult"
        },
        xihuanni: {
            fname: "xihuanniResult"
        },
        cutefansbrand: {
            fname: "cutefansbrandResult"
        },
        choujiang: {
            fname: "choujiangInvite"
        }
    };
    var d = {
        demo: {
            fname: "demoUpdate"
        }
    };
    var l = {};
    var y = {
        eventType: ["chartlet", "popup"],
        eventMap: {},
        onDebug: function () {
            return z
        },
        _customEventConfig: j,
        _customEventConfig320: d,
        addCustomEventConfig: function (A, B) {
            this._addCustomEventConfig(j, A, B)
        },
        addCustomEventConfig320: function (A, B) {
            this._addCustomEventConfig(d, A, B)
        },
        _addCustomEventConfig: function (C, A, B) {
            C = C || {};
            if (!C[A]) {
                C[A] = {};
                C[A].fn = B
            } else {
                console.log(A, "活动名已存在")
            }
        },
        addIcons: function (A, B) {
            l[A] = B
        },
        onReady: function (D, B) {
            var C = this;
            var E = this.eventMap[D];
            var A = function (F) {
                if (!F._isread) {
                    F._isread = 1;
                    if (z) {
                        B && B(F)
                    } else {
                        try {
                            B && B(F)
                        } catch (G) {
                            console.log(G)
                        }
                    }
                }
                if (!F._init) {
                    F._init = 1;
                    F.initialize()
                }
                g(F)
            };
            if (E) {
                g(D + "活动实例已创建，开始初始化活动，执行显示逻辑（用户有资格参与，但活动显示不显示，根据显示逻辑判定）", E);
                A(E)
            } else {
                g(D + "活动实例未创建，等待http或320消息获取活动配置（如果没有此活动配置，说明用户没有资格参与此活动）");
                this.on("onReady", function (G, F) {
                    if (D == G) {
                        g(G, D, F);
                        A(F)
                    }
                })
            }
        },
        onReceiveMsg: function (F, E) {
            g(F);
            var D = F.eventname;
            var G = F.event_data || {};
            if (!this.validData(F)) {
                return
            }
            if (D == "StarShopRocketPop") {
                this.customPopup.visible(G);
                return
            }
            if (D && F.show == 1) {
                var A = this.eventMap["popup." + D];
                g("showResult", A);
                if (A) {
                    A.trigger("onShowResult", A, G)
                } else {
                    var C = j[D];
                    if (C) {
                        if (C.fname) {
                            window[C.fname](G)
                        } else {
                            if (typeof C.fn == "function") {
                                C.fn(G)
                            }
                        }
                    }
                    var B = d[D];
                    if (B && (B.fname || B.fn)) {
                        var H = typeof B.fn == "function" ? B.fn : window[B.fname];
                        H(F, "update")
                    }
                }
            }
            switch (F.initPopEvent) {
                case 0:
                    break;
                case 1:
                    this.getConfig(D);
                    break;
                case 2:
                    this.getConfig();
                    break
            }
            if (E) {
                window.Room && Room.Socket && Room.Socket.trigger("receive:" + E, F)
            }
        },
        sendRequestRoomMsg: function () {
            window.Room && Room.Msg.send("room_eventPopupList")
        },
        _config322: {},
        _config320: {},
        groupLimitConfig: {},
        _configGroupLimit: {},
        setRoomGroupLimit: function (A) {
            if (A) {
                this.groupLimitConfig = A
            }
        },
        validRoomGroupLimit: function (D) {
            var C = this.groupLimitConfig;
            var B = this._configGroupLimit;
            var A = C[D];
            if (typeof A != "undefined") {
                if (A / 1 == 0) {
                    return true
                } else {
                    if (!B[D]) {
                        B[D] = 0
                    }
                    if (B[D] >= A) {
                        console.log(D + "弹窗次数已达上限");
                        return false
                    }
                    B[D] += 1;
                    return true
                }
            } else {
                console.log("groupLimitConfig不存在")
            }
        },
        onReceiveRoomMsg: function (E, A) {
            var D = E.content;
            var F = this._fixConfig(D, A);
            g("socket" + A + " update:", D, F);
            var C = e.extend(this["_config" + A], F);
            this.setRoomGroupLimit(D.group_pop_num);
            var B = this;
            e.each(C, function (H, I) {
                if (e.inArray(I.position, ["room_left_top", "room_right_top", "room_mid_bottom_2", "room_free"]) > -1) {
                    var G = d[I.eventname];
                    if (G && (G.fname || G.fn)) {
                        var J = typeof G.fn == "function" ? G.fn : window[G.fname];
                        if (!F[H]) {
                            J(I, "remove");
                            delete C[H]
                        } else {
                            J(I, "update")
                        }
                    }
                } else {
                    if (!F[H]) {
                        B.offline(H);
                        delete C[H]
                    }
                }
            });
            this["_config" + A] = C;
            this.trigger("onUpdate", C)
        },
        offline: function (B) {
            var A = this.eventMap[B];
            if (A) {
                A.destroy();
                delete this.eventMap[B]
            }
        },
        getConfig: function (A) {
            var B = this;
            var C = {
                av: 0,
                clienttype: 1,
                timestamp: +new Date()
            };
            if (A) {
                C.eventname = A
            }
            e.extend(C, this.getVersion());
            e.getJSON("/api/getEventPop.php", C).done(function (D) {
                if (D.flag == "001") {
                    var E;
                    if (D.content.isInit) {
                        var F = B._fixConfig(D.content.pop_cht || {}, "http");
                        E = {
                            sysver: D.content.sysver,
                            userver: D.content.userver,
                            config: F
                        };
                        g(E);
                        B.updateStorage(E, A)
                    }
                    setTimeout(function () {
                        var H;
                        var G = B.getStorage();
                        if (G) {
                            H = G
                        } else {
                            H = E
                        }
                        B.trigger("onUpdate", H.config)
                    }, 0);
                    g("init from http")
                }
            })
        },
        _obj2Array: function (A) {
            if (!e.isArray(A)) {
                return [A]
            }
            return A
        },
        _fixConfig: function (E, C) {
            var B = {};
            var A = this.eventType;
            var D = this;
            E = E || {};
            this._obj2Array(E.popup);
            this._obj2Array(E.chartlet);
            this.setRoomGroupLimit(E.group_pop_num);
            e.each(E, function (F, G) {
                if (e.inArray(F, A) > -1) {
                    e.each(G, function (H, I) {
                        if (F == A[0]) {
                            if (I.position.indexOf("index") > -1) {
                                return true
                            }
                        }
                        if (!D.validData(I)) {
                            return true
                        }
                        I.id = String.uniqueID();
                        I.__type = F;
                        if (t[I.position]) {
                            I.__key = I.__type + "." + I.eventname + "." + t[I.position]
                        } else {
                            I.__key = I.__type + "." + I.eventname
                        }
                        switch (C) {
                            case "http":
                                I.storageKey = c;
                                break;
                            case "320":
                                I.storageKey = n;
                                break;
                            case "322":
                                I.storageKey = k;
                                break
                        }
                        B[I.__key] = I
                    })
                }
            });
            return B
        },
        validData: function (A) {
            if (A.client && typeof A.client[1] == "undefined") {
                return false
            }
            if (m == "room") {
                if (A.tpltype && !b(A.tpltype)) {
                    return false
                }
                if (A.role && !h(A.role)) {
                    return false
                }
            }
            return true
        },
        getVersion: function () {
            var B = {};
            var A = this.getStorage();
            if (A) {
                B.userver = A.userver;
                B.sysver = A.sysver
            } else {
                B.userver = 0;
                B.sysver = 0
            }
            return B
        },
        setStorage: function (A) {
            u.set(w, A)
        },
        getStorage: function () {
            return u.get(w) || {}
        },
        updateStorage: function (E, A, D) {
            var C = this.getStorage();
            var B = this;
            if (typeof A != "string") {
                D = A;
                A = null
            }
            if (typeof E.sysver != "undefined") {
                C.sysver = E.sysver
            }
            if (typeof E.userver != "undefined") {
                C.userver = E.userver
            }
            if (E.config) {
                if (A) {
                    e.each(this.eventType, function (I, F) {
                        var H = [];
                        if (F == "chartlet") {
                            e.each(t, function (K, J) {
                                var L = F + "." + A + "." + J;
                                H.push(L)
                            })
                        } else {
                            var G = F + "." + A;
                            H.push(G)
                        }
                        e.each(H, function () {
                            var J = this;
                            if (!E.config[J]) {
                                B.offline(J);
                                delete C.config[J]
                            } else {
                                C.config[J] = E.config[J]
                            }
                        })
                    })
                } else {
                    if (D) {
                        e.extend(C.config, E.config)
                    } else {
                        C.config = E.config
                    }
                }
            }
            g(C);
            this.setStorage(C)
        }
    };
    e.extend(y, SimpleEvent.prototype);
    window.chartletHandler = {
        _list: {},
        _listPositionRule: {
            1: ["room_right_bottom"],
            2: ["room_right_bottom_2", "room_right_bottom_3", "room_right_bottom_4"]
        },
        clearList: function () {
            this._list = {}
        },
        addToList: function (A) {
            if (!this._list[A.position]) {
                this._list[A.position] = {
                    list: [],
                    isSignle: false
                }
            }
            this._list[A.position].list.push(A)
        },
        getFinalList: function (C) {
            var B = this;
            var A = {};
            e.each(this._listPositionRule, function (D, E) {
                A[D] = B._getListFromPosition(D)
            });
            return C ? A[C] : A
        },
        getList: function () {
            return this._list
        },
        _getListFromPosition: function (E) {
            var C = this._processList();
            var D = this._listPositionRule;
            var B = [];
            if (E) {
                var A = D[E];
                e.each(A, function (G, F) {
                    var H = C[F];
                    if (H) {
                        if (H.isSignle) {
                            B = H.list;
                            return false
                        }
                        B = B.concat(H.list || [])
                    }
                })
            }
            return B
        },
        _processList: function () {
            var B = this;
            var A = 0;
            e.each(this._list, function (D, E) {
                var C = [];
                e.each(E.list, function (G, F) {
                    C.push(F)
                });
                C.sort(function (G, F) {
                    return F.sort / 1 - G.sort / 1
                });
                B._list[D].isSignle = A;
                B._list[D].list = C
            });
            return this._list
        }
    };
    var a = {
        _state: 0,
        _list: [],
        init: function () {
            this.wrap = e("#rbEventContainer")
        },
        fold: function () {
            clearTimeout(Room.rbContainer.startTimer);
            Room.rbContainer.fold()
        },
        unfold: function () {
            clearTimeout(Room.rbContainer.startTimer);
            Room.rbContainer.unfold()
        },
        toggle: function () {
            Room.rbContainer.toggle()
        },
        getList: function () {
            return this._list
        },
        insertToList: function (A) {
            var C = A.eventname;
            var B = A.sort;
            var E = A.id;
            var D = this;
            this._ready(function () {
                var F = Room.rbContainer.creatItem({
                    str: "",
                    icon: A.icon || l[C] || "",
                    isTop: B + 1,
                    isOpen: 1
                });
                F.attr("id", E);
                D._list.push({
                    id: E,
                    elem: F,
                    config: A
                })
            })
        },
        insert: function (C, A, B) {
            this._ready(function () {
                setTimeout(function () {
                    e(A).appendTo("#" + C + " .content");
                    B && B()
                }, 0)
            })
        },
        remove: function (C, B) {
            var A = [];
            e.each(this._list, function (D, E) {
                if (E.id == C) {
                    A.push(D);
                    A.push(E);
                    return false
                }
            });
            if (A.length) {
                this._list.splice(A[0], 1);
                Room.rbContainer.remove({
                    item: A[1].elem,
                    pop: e(B || ""),
                    state: "remove"
                })
            }
        },
        _ready: function (A) {
            setTimeout(function () {
                Room.Ready.set_init(A)
            }, 5000)
        }
    };
    var o = {
        _state: 0,
        _list: [],
        init: function () {
            var A = "chartlet_right_bottom_2";
            var B = (this.wrap = e("#" + A));
            var C = this;
            if (!B[0]) {
                B = this.wrap = e('<div class="chartlet-wrap">						<div class="arraw"><i></i></div>						<div class="list-wrap"></div>					</div>').attr("id", A).on("click", ".arraw", e.proxy(this, "toggle")).css({
                    position: "static",
                    margin: "0 auto 5px"
                }).on("click", ".base-close", function (E) {
                    var D = e(E.currentTarget);
                    var F = D.parent().attr("id");
                    C.remove(F)
                });
                InsertPageFloatRightBottom(B, 1)
            }
            this.listWrap = B.find(".list-wrap")
        },
        fold: function () {
            if (!this._state) {
                this.listWrap.children().css("display", "none");
                if (this._list[this._list.length - 1]) {
                    this._list[this._list.length - 1].elem.css("display", "block")
                }
                this.wrap.addClass("fold");
                this._state = 1
            }
        },
        unfold: function () {
            if (this._state) {
                this.listWrap.children().css("display", "block");
                this.wrap.removeClass("fold");
                this._state = 0
            }
        },
        toggle: function () {
            this[!this._state ? "fold" : "unfold"]()
        },
        insertToList: function (B) {
            var F = B.eventname;
            var D = B.sort;
            var H = B.id;
            var E = this.listWrap.find(">div"),
                A = null;
            for (var C = E.length - 1; C >= 0; C--) {
                if (D > E.eq(C).data("sort") / 1) {
                    A = E.eq(C);
                    break
                }
            }
            var G = e('<div class="chartlet-list chartlet-list-' + F + '" data-sort="' + D + '" id="' + H + '"><i class="base-close"></i></div>');
            if (A) {
                G.insertAfter(A)
            } else {
                G.prependTo(this.listWrap)
            }
            this._list.push({
                id: H,
                elem: G,
                config: B
            });
            this._updateView()
        },
        getList: function () {
            return this._list
        },
        insert: function (B, A) {
            return e(A).appendTo("#" + B)
        },
        remove: function (B) {
            var A = this._findListIndex(B);
            if (A > -1) {
                this._list.splice(A, 1);
                e("#" + B).remove()
            } else {
                g("移除失败，未找到元素ID：" + B)
            }
            this._updateView()
        },
        _updateView: function () {
            if (!this.wrap) {
                return
            }
            if (this._list.length > 1) {} else {
                this.wrap.find(".arraw").css("display", "none")
            }
            if (this._list.length == 0) {
                this.wrap.css("display", "none")
            } else {
                this.wrap.css("display", "block")
            }
        },
        _findListIndex: function (B) {
            var A = -1;
            e.each(this._list, function (C, D) {
                if (D.id == B) {
                    A = C;
                    return false
                }
            });
            return A
        }
    };
    var q = {
        parse: function (B) {
            var C = B.__key;
            var A = y.eventMap[C];
            if (!A) {
                A = new x(B);
                y.eventMap[C] = A
            }
            A.update(B);
            g(B, A);
            y.trigger("onReady", C, A, B.event_data)
        }
    };
    var r = {
        list: {},
        baseWidth: 400,
        baseHeight: 400,
        prefix: "custom_popup_",
        visibleClass: "custom-popup-wrap-vis",
        visible: function (D) {
            var H = this;
            var I = function () {
                switch (D.clickAction / 1) {
                    case 0:
                        H.hidden(B);
                        break;
                    case 1:
                    case 2:
                        Prompt.alert("暂未处理的点击类型");
                        break
                }
                if (D.analyticClickMoudle) {
                    toZhangzhi("click", D.analyticClickMoudle)
                }
            };
            var B = String.uniqueID();
            var G = this.prefix;
            var F = e('<div class="custom-popup-wrap"></div>').attr("id", G + B);
            var J = e('<div class="content"></div>').css({
                width: D.width + "%",
                position: "relative",
                margin: "0 auto",
                pointerEvents: "auto"
            }).appendTo(F);
            if (D.backgroundImage) {
                var E = e("<img>").attr("src", D.backgroundImage).css({
                    width: "100%",
                    margin: "0 auto"
                }).appendTo(J)
            }
            if (D.closable) {
                var A = e('<a class="close"></a>').on("click", e.proxy(this, "hidden", B)).appendTo(J)
            }
            var C = e('<a class="btn"></a>').css({
                display: "block",
                position: "absolute",
                top: D.buttonTop + "%",
                left: D.buttonLeft + "%",
                width: D.buttonWidth + "%",
                height: D.buttonHeight + "%",
                zIndex: 10,
                background: D.buttonImage ? "url(" + D.buttonImage + ")" : "none",
                backgroundRepeat: "no-repeat",
                backgroundSize: "100% 100%"
            }).on("click", I).appendTo(J);
            if (D.analyticShowModule) {
                toZhangzhi("load", D.analyticShowModule)
            }
            F.appendTo(document.body);
            setTimeout(function () {
                F.addClass(H.visibleClass)
            }, 100);
            this.list[B] = {
                box: F,
                config: D
            }
        },
        hidden: function (C) {
            if (this.list[C]) {
                var B = this;
                var A = this.list[C].box;
                A.removeClass(this.visibleClass);
                setTimeout(function () {
                    A.remove();
                    delete B.list[C]
                }, 300)
            }
        }
    };
    y.customPopup = r;
    y.on("onUpdate", function (B) {
        chartletHandler.clearList();
        e.each(B, function (D, C) {
            var E = C.__type || C[0].__type;
            switch (E) {
                case "popup":
                    q.parse(C);
                    break;
                case "chartlet":
                    if (e.type(C) == "array") {
                        e.each(C, function () {
                            chartletHandler.addToList(this)
                        })
                    } else {
                        chartletHandler.addToList(C)
                    }
                    break
            }
        });
        var A = chartletHandler.getFinalList();
        g(A);
        e.each(A, function (C, D) {
            e.each(D, function (G, F) {
                var H = F.__key;
                var E = y.eventMap[H];
                if (!E) {
                    switch (C / 1) {
                        case 1:
                            E = new s(a, F);
                            break;
                        case 2:
                            E = new s(o, F);
                            break
                    }
                    g(H, C, E);
                    y.eventMap[H] = E;
                    if (F.chartletType == "pic" && F.pic_pc != "" && F.pic_url_pc != "") {
                        window.popBase.onReady(H, function (I) {
                            var J = I.conf;
                            if (window.page && window.page.rid) {
                                J.pic_url_pc = J.pic_url_pc + (J.pic_url_pc.indexOf("?") > -1 ? "&" : "?") + "ruid=" + page.rid
                            }
                            var K = e('<a data-tracing="' + F.eventname + '" style="display:block;" href="' + J.pic_url_pc + '" target="_blank"><img style="width:100%;" src="' + J.pic_pc + '"/></a>');
                            if (J.pic_url_pc.indexOf("opentypepc=iframe") > -1) {
                                K.click(function () {
                                    var N = e(this).attr("href");
                                    var L = getQueryString(N, "sign");
                                    var M = {
                                        url: N,
                                        title: "六间房",
                                        effect: "webview-iframe-right"
                                    };
                                    if (L) {
                                        M.sign = L
                                    }
                                    window.openReactIframe && window.openReactIframe.open("reactPage", M);
                                    return false
                                })
                            }
                            I.on("onVisible", function () {
                                I.insertToWrap(K)
                            });
                            I.on("onHidden", function () {
                                K.remove();
                                I.destroy()
                            })
                        })
                    }
                }
                E.update(F);
                y.trigger("onReady", H, E, F.event_data)
            })
        })
    });
    window.popBase = y;
    window.popBaseStorage = u;
    if (e.inArray(m, ["room", "index", "index_guide", "room_voice"]) > -1) {
        window.popBase.getConfig()
    }
    window.roomVideoRightBottom = a;
    window.roomPageRightBottom = o;
    var p = '<div class="test" style="width:100px;height:100px; line-height:100px; text-align:center; position:absolute; z-index:999; left:50%; top:50%; margin-left:-50px; margin-top:-50px; background:#ccc;"></div>';
    window.popBase.onReady("popup.test1", function (A) {
        var B = A.configData.event_data;
        var C = e(p).html("test1");
        A.on("onVisible", function () {
            C.appendTo(document.body)
        });
        A.on("onHidden", function () {
            C.remove()
        });
        A.on("onShowResult", function (D, E) {
            C.html("test1 onShowResult")
        })
    });
    window.popBase.onReady("popup.test3", function (A) {
        var B = e(p).html("test3");
        A.on("onVisible", function () {
            B.appendTo(document.body)
        });
        A.on("onHidden", function () {
            B.remove()
        });
        A.on("onShowResult", function (C, D) {
            B.html("test3 onShowResult")
        })
    });
    window.popBase.onReady("chartlet.test1.left", function (A) {
        var C = A.getConfig().id;
        var B = e('<div class="test" style="width:80px;height:80px;background:#ccc;">创可贴测试1</div>');
        A.on("onVisible", function () {
            A.insertToWrap(B)
        });
        B.on("click", "close", function () {
            A.destroy()
        });
        A.on("onDestroy", function (D) {
            B.off().remove()
        });
        A.on("onUpdate", function (D) {
            g(D.eventname + ":更新活动配置", D)
        })
    });
    window.popBase.onReady("chartlet.test1.right", function (A) {
        var C = A.getConfig().id;
        var B = e('<div class="test" style="width:80px;height:80px;background:#ccc;">创可贴测试1</div>');
        A.on("onVisible", function () {
            A.insertToWrap(B)
        });
        B.on("click", "close", function () {
            A.destroy()
        });
        A.on("onDestroy", function (D) {
            B.off().remove()
        });
        A.on("onUpdate", function (D) {
            g(D.eventname + ":更新活动配置", D)
        })
    });
    window.popBase.onReady("chartlet.test2.right", function (A) {
        var D = A.getConfig().id;
        var C = e('<div class="test2_0" style="width:80px;height:80px;background:#000;">贴测test2_0.right</div>');
        var B = A.conf.event_data;
        A.on("onVisible", function () {
            A.insertToWrap(C)
        });
        A.on("onDestroy", function (E) {
            C.off().remove()
        });
        C.on("click", "close", function () {
            A.destroy()
        });
        A.on("onUpdate", function (E) {
            g(E.eventname + ":更新活动配置", E)
        })
    });
    window.popBase.onReady("chartlet.test2.left", function (A) {
        var C = A.getConfig().id;
        var B = e('<div class="test2_0" style="width:80px;height:80px;background:#ff0000;">贴测试est2_0.left</div>');
        A.on("onVisible", function () {
            A.insertToWrap(B)
        });
        A.on("onDestroy", function (D) {
            B.off().remove()
        });
        B.on("click", "close", function () {
            A.destroy()
        });
        A.on("onUpdate", function (D) {
            g(D.eventname + ":更新活动配置", D)
        })
    });
    window.popBase.onReady("chartlet.test3.right", function (A) {
        var C = A.getConfig().id;
        var B = e('<div class="test2" style="width:80px;height:80px;background:#38f;">贴测test3_0.right</div>');
        A.on("onVisible", function () {
            A.insertToWrap(B)
        });
        A.on("onDestroy", function (D) {
            B.off().remove()
        });
        B.on("click", "close", function () {
            A.destroy()
        });
        A.on("onUpdate", function (D) {
            g(D.eventname + ":更新活动配置", D)
        })
    });
    window.popBase.onReady("chartlet.test3.left", function (A) {
        var C = A.getConfig().id;
        var B = e('<div class="test3_0" style="width:80px;height:80px;background:#38f; margin:0 auto">贴测test3_0.left</div>');
        A.on("onVisible", function () {
            A.insertToWrap(B)
        });
        A.on("onDestroy", function (D) {
            B.off().remove()
        });
        B.on("click", "close", function () {
            A.destroy()
        });
        A.on("onUpdate", function (D) {
            g(D.eventname + ":更新活动配置", D)
        })
    })
})(jQuery);
(function (a) {
    window.ForceBundMobile = function () {
        a.getJSON("/coop/mobile/isForceBundMobile.php", function (b) {
            if (b.flag == "001" && b.content.isForceBundMobile) {
                window.BindMobile.init("login")
            }
        })
    };
    if (location.host.indexOf("dev.v.6.cn") > -1) {
        window.BindMobile = {
            tpl: "/js/tpls/loginBindMobile_v2.html",
            isInit: 0,
            init: function (b) {
                var c = this;
                if (c.isInit) {
                    c.setState(1, b)
                } else {
                    c.isInit = 1;
                    a.ajax({
                        dataType: "text",
                        url: c.tpl,
                        success: function (d) {
                            c.box = a(d).appendTo(document.body).eq(0);
                            c.selectBox = c.box.find(".area-select");
                            c.areaBox = c.box.find(".area");
                            c.getCodeBtn = c.box.find(".code-btn");
                            c.mobileBox = c.box.find(".item-box.mobile input");
                            c.codeBox = c.box.find(".item-box.code input");
                            c.subBtn = c.box.find(".submit-btn");
                            c.getInternationCode();
                            c.addEvent();
                            setTimeout(function () {
                                c.setState(1, b)
                            }, 200)
                        }
                    })
                }
            },
            addEvent: function () {
                var b = this;
                this.areaBox.click(function (c) {
                    c.preventDefault();
                    c.stopPropagation();
                    if (b.selectBox.hasClass("show")) {
                        b.selectBox.removeClass("show")
                    } else {
                        b.selectBox.addClass("show")
                    }
                });
                this.box.click(function () {
                    b.selectBox.removeClass("show")
                });
                this.selectBox.on("click", "li", function (d) {
                    a(this).addClass("on").siblings().removeClass("on");
                    var c = a(this).find(".s2").html();
                    b.areaBox.find("span").html(c);
                    b.areaCode = c.replace("+", "");
                    b.pattern = a(this).data("pattern")
                });
                this.getCodeBtn.click(function () {
                    var c = b.mobileBox.val();
                    if (b.check_mobile(c)) {
                        b.getAuthCode(c)
                    } else {
                        calert("请输入正确的手机号码")
                    }
                });
                this.subBtn.click(function () {
                    if (a(this).hasClass("disable")) {
                        return
                    }
                    var c = b.mobileBox.val();
                    var d = b.codeBox.val();
                    if (!b.check_mobile(c)) {
                        calert("请输入正确的手机号码");
                        return
                    }
                    if (!d || !/^\d+$/.test(d)) {
                        calert("请输入验证码");
                        return
                    }
                    if (!b.policy) {
                        calert("请勾选协议");
                        return
                    }
                    a(this).addClass("disable");
                    b.bundleMobile(d, b.areaCode + "-" + c)
                });
                this.mobileBox.on("input propertychange", function () {
                    b.checkoutSubmitState()
                });
                this.codeBox.on("input propertychange", function () {
                    b.checkoutSubmitState()
                });
                this.box.on("click", ".policy span", function () {
                    if (b.policy == 1) {
                        b.policy = 0;
                        a(this).removeClass("on")
                    } else {
                        b.policy = 1;
                        a(this).addClass("on")
                    }
                    b.checkoutSubmitState()
                });
                this.box.find(".close_big").click(function () {
                    b.setState(0)
                });
                this.box.find(".login-out a").click(function () {
                    location.href = loginFast.loginOutUrl()
                })
            },
            checkoutSubmitState: function () {
                var b = this.mobileBox.val();
                var c = this.codeBox.val();
                if (!this.check_mobile(b)) {
                    this.subBtn.addClass("disable");
                    return
                }
                if (!c || !/^\d+$/.test(c)) {
                    this.subBtn.addClass("disable");
                    return
                }
                if (!this.policy) {
                    this.subBtn.addClass("disable");
                    return
                }
                this.subBtn.removeClass("disable")
            },
            getAuthCode: function (c) {
                if (this.getCodeBtn.hasClass("disable")) {
                    return
                }
                this.getCodeBtn.addClass("disable");
                var b = this;
                a.ajax({
                    type: "post",
                    dataType: "json",
                    url: "/auth/getAuthCode.php",
                    data: {
                        act: "bundle",
                        mobile: b.areaCode + "-" + c
                    },
                    success: function (d) {
                        if (d.flag == "001") {
                            b.getCodeBtn.html("重新获取(60s)");
                            b.timeDown()
                        } else {
                            b.getCodeBtn.removeClass("disable");
                            calert(d.content)
                        }
                    }
                })
            },
            ctm: 60,
            timeDown: function () {
                var b = window.BindMobile;
                clearTimeout(b.st);
                b.getCodeBtn.html("重新获取(" + b.ctm + "s)");
                if (b.ctm > 0) {
                    b.ctm--;
                    b.st = setTimeout(b.timeDown, 1000)
                } else {
                    b.getCodeBtn.html("获取验证码").removeClass("disable");
                    b.ctm = 60
                }
            },
            bundleMobile: function (d, b) {
                var c = this;
                a.ajax({
                    type: "post",
                    dataType: "json",
                    url: "/auth/bundleMobile.php",
                    data: {
                        code: d,
                        mobile: b
                    },
                    success: function (e) {
                        c.subBtn.removeClass("disable");
                        if (e.flag == "001") {
                            c.setState(0);
                            calert("绑定手机号成功")
                        } else {
                            calert(e.content)
                        }
                    }
                })
            },
            getInternationCode: function () {
                var b = this;
                a.getJSON("/user/getInternationCode.php?c=1", function (d) {
                    if (d.flag == "001") {
                        var c = "";
                        a.each(d.content, function (f, e) {
                            c += '<li class="' + (f == 0 ? "on" : "") + '" data-pattern="' + e.pattern + '"><span class="s1">' + e.title + '</span><span class="s2">+' + e.code + "</span></li>";
                            if (f == 0) {
                                b.areaBox.find("span").html("+" + e.code);
                                b.areaCode = e.code;
                                b.pattern = e.pattern
                            }
                        });
                        b.selectBox.html(c)
                    }
                })
            },
            setState: function (c, b) {
                var d = this;
                clearTimeout(this.timer);
                var b = "login-bind-mobile" + (b ? " " + b : "");
                if (c) {
                    b += " show";
                    this.box.attr("class", b).css("z-index", 9999);
                    this.getCodeBtn.html("获取验证码").removeClass("disable");
                    Mask.create()
                } else {
                    this.box.removeClass("show");
                    this.timer = setTimeout(function () {
                        d.box.css("z-index", -9999)
                    }, 400);
                    Mask.remove()
                }
            },
            check_mobile: function (b) {
                var c = this;
                if (!b || !new RegExp(c.pattern).test(c.areaCode + "-" + b)) {
                    return false
                }
                return true
            }
        }
    } else {
        window.BindMobile = {
            tpl: "/js/tpls/loginBindMobile.html",
            isInit: 0,
            init: function (b) {
                var c = this;
                if (c.isInit) {
                    c.setState(1, b)
                } else {
                    c.isInit = 1;
                    a.ajax({
                        dataType: "text",
                        url: c.tpl,
                        success: function (d) {
                            c.box = a(d).appendTo(document.body).eq(0);
                            c.selectBox = c.box.find(".area-select");
                            c.areaBox = c.box.find(".area");
                            c.getCodeBtn = c.box.find(".code-btn");
                            c.mobileBox = c.box.find(".item-box.mobile input");
                            c.codeBox = c.box.find(".item-box.code input");
                            c.subBtn = c.box.find(".submit-btn");
                            c.getInternationCode();
                            c.addEvent();
                            setTimeout(function () {
                                c.setState(1, b)
                            }, 200)
                        }
                    })
                }
            },
            addEvent: function () {
                var b = this;
                this.areaBox.click(function (c) {
                    c.preventDefault();
                    c.stopPropagation();
                    if (b.selectBox.hasClass("show")) {
                        b.selectBox.removeClass("show")
                    } else {
                        b.selectBox.addClass("show")
                    }
                });
                this.box.click(function () {
                    b.selectBox.removeClass("show")
                });
                this.selectBox.on("click", "li", function (d) {
                    a(this).addClass("on").siblings().removeClass("on");
                    var c = a(this).find(".s2").html();
                    b.areaBox.find("span").html(c);
                    b.areaCode = c.replace("+", "");
                    b.pattern = a(this).data("pattern")
                });
                this.getCodeBtn.click(function () {
                    var c = b.mobileBox.val();
                    if (b.check_mobile(c)) {
                        b.getAuthCode(c)
                    } else {
                        calert("请输入正确的手机号码")
                    }
                });
                this.subBtn.click(function () {
                    if (a(this).hasClass("disable")) {
                        return
                    }
                    var c = b.mobileBox.val();
                    var d = b.codeBox.val();
                    if (!b.check_mobile(c)) {
                        calert("请输入正确的手机号码");
                        return
                    }
                    if (!d || !/^\d+$/.test(d)) {
                        calert("请输入验证码");
                        return
                    }
                    if (!b.policy) {
                        calert("请勾选协议");
                        return
                    }
                    a(this).addClass("disable");
                    b.bundleMobile(d, b.areaCode + "-" + c)
                });
                this.mobileBox.on("input propertychange", function () {
                    b.checkoutSubmitState()
                });
                this.codeBox.on("input propertychange", function () {
                    b.checkoutSubmitState()
                });
                this.box.on("click", ".policy span", function () {
                    if (b.policy == 1) {
                        b.policy = 0;
                        a(this).removeClass("on")
                    } else {
                        b.policy = 1;
                        a(this).addClass("on")
                    }
                    b.checkoutSubmitState()
                });
                this.box.find(".close_big").click(function () {
                    b.setState(0)
                })
            },
            checkoutSubmitState: function () {
                var b = this.mobileBox.val();
                var c = this.codeBox.val();
                if (!this.check_mobile(b)) {
                    this.subBtn.addClass("disable");
                    return
                }
                if (!c || !/^\d+$/.test(c)) {
                    this.subBtn.addClass("disable");
                    return
                }
                if (!this.policy) {
                    this.subBtn.addClass("disable");
                    return
                }
                this.subBtn.removeClass("disable")
            },
            getAuthCode: function (c) {
                if (this.getCodeBtn.hasClass("disable")) {
                    return
                }
                this.getCodeBtn.addClass("disable");
                var b = this;
                a.ajax({
                    type: "post",
                    dataType: "json",
                    url: "/auth/getAuthCode.php",
                    data: {
                        act: "bundle",
                        mobile: b.areaCode + "-" + c
                    },
                    success: function (d) {
                        if (d.flag == "001") {
                            b.getCodeBtn.html("重新获取(60s)");
                            b.timeDown()
                        } else {
                            b.getCodeBtn.removeClass("disable");
                            calert(d.content)
                        }
                    }
                })
            },
            ctm: 60,
            timeDown: function () {
                var b = window.BindMobile;
                clearTimeout(b.st);
                b.getCodeBtn.html("重新获取(" + b.ctm + "s)");
                if (b.ctm > 0) {
                    b.ctm--;
                    b.st = setTimeout(b.timeDown, 1000)
                } else {
                    b.getCodeBtn.html("获取验证码").removeClass("disable");
                    b.ctm = 60
                }
            },
            bundleMobile: function (d, b) {
                var c = this;
                a.ajax({
                    type: "post",
                    dataType: "json",
                    url: "/auth/bundleMobile.php",
                    data: {
                        code: d,
                        mobile: b
                    },
                    success: function (e) {
                        c.subBtn.removeClass("disable");
                        if (e.flag == "001") {
                            c.setState(0);
                            calert("绑定手机号成功")
                        } else {
                            calert(e.content)
                        }
                    }
                })
            },
            getInternationCode: function () {
                var b = this;
                a.getJSON("/user/getInternationCode.php?c=1", function (d) {
                    if (d.flag == "001") {
                        var c = "";
                        a.each(d.content, function (f, e) {
                            c += '<li class="' + (f == 0 ? "on" : "") + '" data-pattern="' + e.pattern + '"><span class="s1">' + e.title + '</span><span class="s2">+' + e.code + "</span></li>";
                            if (f == 0) {
                                b.areaBox.find("span").html("+" + e.code);
                                b.areaCode = e.code;
                                b.pattern = e.pattern
                            }
                        });
                        b.selectBox.html(c)
                    }
                })
            },
            setState: function (c, b) {
                var d = this;
                clearTimeout(this.timer);
                if (c) {
                    this.box.addClass("show" + (b == "hideClose" ? " hide-close" : "")).css("z-index", 9999);
                    Mask.create()
                } else {
                    this.box.removeClass("show hide-close");
                    this.getCodeBtn.html("获取验证码").removeClass("disable");
                    this.timer = setTimeout(function () {
                        d.box.css("z-index", -9999)
                    }, 400);
                    Mask.remove()
                }
            },
            check_mobile: function (b) {
                var c = this;
                if (!b || !new RegExp(c.pattern).test(c.areaCode + "-" + b)) {
                    return false
                }
                return true
            }
        }
    }
    setTimeout(function () {
        if (location.host.indexOf("dev.v.6.cn") > -1 && _puser.uid && _puser.phone != 1 && location.search.indexOf("pagereferrer=login") > -1) {
            window.ForceBundMobile()
        }
    }, 1000)
})(jQuery);
(function (e) {
    if (!_puser.uid || !_puser.cancelUser) {
        return
    }
    var c = window.location.href;
    var d = window.location.host.indexOf("dev.") > -1 ? "v.6.cn" : document.domain;
    var f = getCookie("ticket_v");
    var a = (f && f.slice(-5)) || "";
    var b = "//passport.6.cn/sso/logout.php?domain=" + d + "&prod=" + a + "&url=" + encodeURIComponent("//" + location.host + "/logout_test.php") + "&next_action=" + encodeURIComponent("//" + location.host + "/event/liveClient/?t=phone");
    if (c.indexOf("/event/liveClient/") == -1) {
        location.href = "/event/liveClient/?t=phone";
        return
    }
    Prompt.create({
        btn_sure: {
            text: "确定"
        },
        content: "您的账号已申请注销，如需恢复账号，请在自申请注销后15天内下载安装 APP 申请取消注销。",
        success: function () {
            location.href = b
        },
        callback: function () {
            location.href = b
        }
    })
})(jQuery);
(function (a) {
    window.qimoChatLoader = {
        count: 0,
        max: 50,
        src: "//ykf-webchat.7moor.com/javascripts/7moorInit.js?accessId=eea00c60-dd84-11eb-a470-7b212a7f2871&autoShow={autoshow}&language=ZHCN",
        _testSdkLoaded: function (c) {
            var b = this;
            if (this.count > this.max) {
                c && c(0);
                return alert("加载超时，请重新连接")
            }
            this.count++;
            clearTimeout(this._ltm);
            this._ltm = setTimeout(function () {
                if (b.isSdkLoaded()) {
                    c && c(1)
                } else {
                    b._testSdkLoaded(c)
                }
            }, 100)
        },
        isSdkLoaded: function () {
            return !!window.qimoChatLoaded
        },
        openChat: function () {
            window.qimoChatClick && qimoChatClick()
        },
        openChatClick: function (c, e, b, f) {
            var d = this;
            var c = a(c);
            if (c.hasClass("disabled")) {
                return
            }
            c.addClass("disabled");
            this.load(e, function (g) {
                if (g) {
                    d.openChat();
                    f && f()
                }
                c.removeClass("disabled")
            }, b)
        },
        load: function (c, e, b) {
            if (this.isSdkLoaded()) {
                e && e(1)
            } else {
                var c = c || {};
                var b = b || {};
                var d = this.src.replace(/{autoshow}/, !!b.autoShow);
                window.qimoClientId = a.extend({
                    userId: _puser.uid,
                    nickName: _puser.nickname + "(" + _puser.uid + ")"
                }, c);
                this.count = 0;
                $LAB.script(d).wait(a.proxy(this, "_testSdkLoaded", e))
            }
        }
    };
    window.largeRechargePrompt = function (c, b) {
        Prompt.create({
            wrapClass: "promptbox-call-service-big",
            btn_sure: {
                text: "大客户经理"
            },
            content: "您的单笔充值金额超过" + b.bigPayInputLimit / 10000 + '万，请点击下方按钮联系<b style="color:#ff2026">大客户经理</b>通过官方充值渠道进行充值服务。',
            onSubmit: function () {
                var d = Prompt.box.find("a.sure");
                qimoChatLoader.openChatClick(d, c, b, function () {
                    Prompt.close(1)
                })
            }
        })
    }
})(jQuery);
(function (e) {
    var f = {
        _keyStr: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",
        encode: function (j) {
            var g = "";
            var q, o, m, p, n, l, k;
            var h = 0;
            j = f._utf8_encode(j);
            while (h < j.length) {
                q = j.charCodeAt(h++);
                o = j.charCodeAt(h++);
                m = j.charCodeAt(h++);
                p = q >> 2;
                n = ((q & 3) << 4) | (o >> 4);
                l = ((o & 15) << 2) | (m >> 6);
                k = m & 63;
                if (isNaN(o)) {
                    l = k = 64
                } else {
                    if (isNaN(m)) {
                        k = 64
                    }
                }
                g = g + this._keyStr.charAt(p) + this._keyStr.charAt(n) + this._keyStr.charAt(l) + this._keyStr.charAt(k)
            }
            return g
        },
        decode: function (j) {
            var g = "";
            var q, o, m;
            var p, n, l, k;
            var h = 0;
            j = j.replace(/[^A-Za-z0-9\+\/\=]/g, "");
            while (h < j.length) {
                p = this._keyStr.indexOf(j.charAt(h++));
                n = this._keyStr.indexOf(j.charAt(h++));
                l = this._keyStr.indexOf(j.charAt(h++));
                k = this._keyStr.indexOf(j.charAt(h++));
                q = (p << 2) | (n >> 4);
                o = ((n & 15) << 4) | (l >> 2);
                m = ((l & 3) << 6) | k;
                g = g + String.fromCharCode(q);
                if (l != 64) {
                    g = g + String.fromCharCode(o)
                }
                if (k != 64) {
                    g = g + String.fromCharCode(m)
                }
            }
            g = f._utf8_decode(g);
            return g
        },
        _utf8_encode: function (h) {
            h = h.replace(/\r\n/g, "\n");
            var g = "";
            for (var j = 0; j < h.length; j++) {
                var i = h.charCodeAt(j);
                if (i < 128) {
                    g += String.fromCharCode(i)
                } else {
                    if (i > 127 && i < 2048) {
                        g += String.fromCharCode((i >> 6) | 192);
                        g += String.fromCharCode((i & 63) | 128)
                    } else {
                        g += String.fromCharCode((i >> 12) | 224);
                        g += String.fromCharCode(((i >> 6) & 63) | 128);
                        g += String.fromCharCode((i & 63) | 128)
                    }
                }
            }
            return g
        },
        _utf8_decode: function (g) {
            var h = "";
            var j = 0;
            var k = (c1 = c2 = 0);
            while (j < g.length) {
                k = g.charCodeAt(j);
                if (k < 128) {
                    h += String.fromCharCode(k);
                    j++
                } else {
                    if (k > 191 && k < 224) {
                        c2 = g.charCodeAt(j + 1);
                        h += String.fromCharCode(((k & 31) << 6) | (c2 & 63));
                        j += 2
                    } else {
                        c2 = g.charCodeAt(j + 1);
                        c3 = g.charCodeAt(j + 2);
                        h += String.fromCharCode(((k & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63));
                        j += 3
                    }
                }
            }
            return h
        }
    };
    var d = function (g) {
        return f.encode(g + "")
    };
    var c = function (g) {
        g = encodeURIComponent(String(g)).replace(/%([0-9A-F]{2})/g, function (h, i) {
            return String.fromCharCode("0x" + i)
        });
        g = window.btoa ? window.btoa(g) : window.Base64.encode(g);
        return g.replace(/\+|\/|=/g, function (h) {
            switch (h) {
                case "+":
                    return "(";
                case "/":
                    return ")";
                case "=":
                    return "@"
            }
        })
    };
    var b = function (g) {
        return g !== null && typeof g == "object"
    };
    var a = function (i, g) {
        var j = {
            padenc: 2,
            padkey: ""
        };
        if (b(i)) {
            var l = [];
            for (var h in i) {
                if (typeof i[h] != "string" && typeof i[h] != "number") {
                    continue
                }
                var m = g && e.inArray(h, g) < 0;
                !m && l.push(h);
                j[h] = !m ? c(i[h]) : i[h]
            }
            j.padkey = l.join();
            return j
        }
        return i
    };
    window.Base64 = f;
    window.paramEncode = c;
    window.paramEncodeWithPad = a
})(jQuery);
(function (b) {
    var d = {
        swf: "",
        width: "100%",
        height: "100%",
        preload: 1,
        autoplay: 1
    };
    var c = function () {
        return window.swfobject ? swfobject.ua.pv[0] : 0
    };

    function a(g, f) {
        this.wrap = b(g);
        var e = (this.conf = b.extend({
            id: String.uniqueID()
        }, d, f || {}));
        this.readyFnName = "flash_ani_ready_" + e.id;
        this.closeFnName = "flash_ani_close_" + e.id;
        if (e.preload) {
            this.load()
        }
    }
    b.extend(a.prototype, {
        load: function () {
            var j = this;
            var i = this.wrap;
            var f = this.conf;
            var k = f.id;
            var h = f.swf;
            var g = f.width;
            var e = f.height;
            if (!h) {
                return
            }
            $LAB.script(JSF.swf).wait(function () {
                var l = c();
                if (l > 0) {
                    i.append('<div id="' + k + '"></div>');
                    window[j.readyFnName] = b.proxy(j, "_ready");
                    window[j.closeFnName] = b.proxy(j, "destroy");
                    swfobject.embedSWF(h, k, g, e, "10.1", "/apple/expressInstall.swf", {
                        readyFun: j.readyFnName,
                        closeFun: j.closeFnName
                    }, {
                        wmode: "transparent",
                        allowscriptaccess: "always"
                    })
                } else {
                    j.trigger("onError", f, "flashUnInstall")
                }
            })
        },
        _ready: function () {
            var e = this.conf;
            this.video = swfobject.getObjectById(e.id);
            this.trigger("onReady", e);
            if (e.autoplay) {
                this.play()
            }
        },
        play: function () {
            try {
                this.video.play()
            } catch (f) {}
        },
        pause: function () {
            try {
                this.video.stop()
            } catch (f) {}
        },
        destroy: function () {
            var e = this;
            setTimeout(function () {
                b("#" + e.conf.id).remove();
                e.video = e.conf = null
            }, 0);
            delete window[this.readyFnName];
            delete window[this.closeFnName];
            this.trigger("onDestroy")
        }
    });
    b.extend(a.prototype, SimpleEvent.prototype);
    window.FlashVideoAnimation = a
})(jQuery);
(function (b) {
    var c = b.browser.msie;
    var a = {
        scrollWrap: "",
        scrollContent: "",
        scrollItem: "",
        triggerType: "click",
        prevBtnClass: "prev",
        nextBtnClass: "next",
        btnDisableClass: "disabled",
        activeClass: "active",
        viewportSize: 1
    };
    var d = function (f, e) {
        this.wrap = b(f);
        this.conf = b.extend({}, a, e || {});
        this.scrollWrap = this.wrap.find(this.conf.scrollWrap);
        this.scrollContent = this.wrap.find(this.conf.scrollContent);
        this.panels = [];
        this.length = 0;
        this.activeIndex = -1;
        this.size = this.conf.viewportSize;
        this.disabled = false;
        this.initialize()
    };
    b.extend(d.prototype, {
        initialize: function () {
            this._addPanels();
            this._bindEvents()
        },
        _bindEvents: function () {
            var e = this.conf;
            this.wrap.on(e.triggerType, "." + e.prevBtnClass, b.proxy(this, "_upDownHandler")).on(e.triggerType, "." + e.nextBtnClass, b.proxy(this, "_upDownHandler"))
        },
        _addPanels: function () {
            var f = this.wrap.find(this.conf.scrollItem);
            var e = [];
            b.each(f, function (g, h) {
                e.push(b(h))
            });
            this.panels = e;
            this.length = e.length;
            this.width = e[0].outerWidth(true);
            this.scrollWrap.css("width", this.width * this.size);
            this.scrollContent.css("width", this.width * this.length)
        },
        _switchValid: function (e) {
            if (this.disabled) {
                return false
            }
            if (this.activeIndex == e) {
                return false
            }
            if (e < 0 || e > this.panels.length - 1) {
                return false
            }
            return true
        },
        _upDownHandler: function (h) {
            var g = b(h.currentTarget);
            var f = this.conf;
            event.preventDefault();
            if (g.hasClass(f.prevBtnClass)) {
                this._upDown()
            } else {
                this._upDown(true)
            }
        },
        _upDown: function (g) {
            var e = this.activeIndex;
            var f = e + (g ? 1 : -1);
            f = Math.min(this.length - 1, Math.max(0, f));
            this.scrollTo(f)
        },
        scrollTo: function (g) {
            g = Number(g);
            if (!this._switchValid(g)) {
                return
            }
            if (g >= this.length - this.size) {
                g = this.length - this.size
            }
            var e = this.activeIndex;
            var f = this.panels;
            e = typeof e == "undefined" ? -1 : e;
            this._switchPanel(f[e], f[g], g);
            this._checkUpDown(g);
            this.activeIndex = g;
            this.trigger("onScroll", f[e], f[g], g)
        },
        _switchPanel: function (i, e, f) {
            i && i.removeClass("active");
            e.addClass("active");
            var g = this.length - this.size;
            if (f > g) {
                f = g
            }
            var h = -1 * f * this.width;
            if (!c) {
                this.scrollContent.css("transform", "translateX(" + h + "px)")
            } else {
                this.scrollContent.animate({
                    left: h
                }, 300)
            }
        },
        _checkUpDown: function (h) {
            var j = this.wrap;
            var g = this.conf;
            var i = j.find("." + g.prevBtnClass);
            var e = j.find("." + g.nextBtnClass);
            var f = g.btnDisableClass;
            if (i.length == 0 || e.length == 0) {
                return console.log("not found prev or next")
            }
            e.removeClass(f);
            i.removeClass(f);
            if (h <= 0) {
                i.addClass(f)
            }
            if (h >= this.length - this.size) {
                e.addClass(f)
            }
        },
        prev: function () {
            this._upDown()
        },
        next: function () {
            this._upDown(true)
        },
        enable: function () {
            this.disabled = true
        },
        disable: function () {
            this.disabled = false
        }
    });
    jQuery.extend(d.prototype, SimpleEvent.prototype);
    window.Scroll = d
})(jQuery);
(function (b) {
    var c = function () {
        this.initialize.apply(this, arguments)
    };
    var a = {
        beforeText: "关注",
        afterText: "已关注",
        cancelText: "取消关注"
    };
    c.prototype = {
        setting: 0,
        initialize: function (d, f, e, g) {
            this.button = jQuery(d);
            this.tuid = f;
            this.text = jQuery.extend({}, a, g || {});
            this.change(e, true);
            this.button.on("click.favorite", jQuery.proxy(this, "_clickHandler"));
            this.button.on("mouseenter.favorite", jQuery.proxy(this, "_mouseenterHandler"));
            this.button.on("mouseleave.favorite", jQuery.proxy(this, "_mouseleaveHandler"))
        },
        change: function (e, d) {
            this.state = e = e / 1;
            if (e) {
                this.button.addClass("followed").html(this.text.afterText)
            } else {
                this.button.removeClass("followed").html(this.text.beforeText)
            }
            if (!d) {
                Mediator && Mediator.publish("favorite-state-change", e, this.tuid)
            }
        },
        changeUser: function (e, d) {
            this.tuid = e;
            this.change(d)
        },
        destroy: function () {
            this.button && this.button.off(".favorite");
            this.tuid = this.text = null
        },
        getState: function (d, f) {
            var e = this;
            jQuery.getJSON("/room/isfallowed.php", {
                faluidstr: d
            }).done(function (h) {
                var g;
                if (h.flag == "001") {
                    g = h.content[d];
                    e.change(g, true);
                    f && f(g)
                }
            })
        },
        set: function () {
            if (this.setting) {
                return
            }
            var f = this;
            var d = this.state ? "/message/follow_del.php" : "/message/follow_add.php";
            this.setting = 1;
            this.button.addClass("following");
            var e = {
                tuid: this.tuid,
                act: "p",
                format: "json"
            };
            jQuery.extend(e, zhangZhiParam());
            jQuery.ajax({
                dataType: "json",
                url: d,
                data: e,
                success: function (g) {
                    if (g.flag == "001") {
                        f.change(!f.state)
                    } else {
                        Prompt.alert(g.content)
                    }
                    f.setting = 0;
                    f.button.removeClass("following")
                }
            })
        },
        _clickHandler: function (d) {
            d.preventDefault();
            if (!_puser.uid) {
                Login.toLogin();
                return false
            }
            this.set()
        },
        _mouseenterHandler: function () {
            if (this.state) {
                this.button.html(this.text.cancelText)
            }
        },
        _mouseleaveHandler: function () {
            if (this.state) {
                this.button.html(this.text.afterText)
            }
        }
    };
    window.Follow = c
})(jQuery);
var EVENT_IFRAME_WRAP = '<div class="event-iframe-pop event-iframe-{size}">        <h3 class="handle">{title}</h3>		<a class="close"></a>        <div class="iframe-box">            <iframe crossorigin width="100%" height="100%" allowtransparency="true" align="center" name="main" onload="this.height=600" frameborder="0" scrolling="auto" src="{eventLink}"></iframe>        </div>    </div>';
var EVENT_IFRAME_DEFAULT_CONF = {
    size: "default",
    appendTo: document.body
};
var creatEventIframe = function (b, a) {
    this._vis = 0;
    this._config = jQuery.extend({}, EVENT_IFRAME_DEFAULT_CONF, a || {});
    this.iframeBox = null;
    this.target = jQuery(b);
    this.target.on("click", jQuery.proxy(this, "_buttonClickHanlder"))
};
creatEventIframe.prototype = {
    visible: function () {
        if (!this.iframeBox) {
            this.getLink()
        }
    },
    hidden: function () {
        if (this.iframeBox) {
            this.iframeBox.remove();
            this.iframeBox = null;
            this.iframeBox.removeClass("event-iframe-pop-show")
        }
    },
    getLink: function () {
        var a = this;
        var b = this._config;
        var c = EVENT_IFRAME_WRAP.replace("{size}", a._config.size).replace("{eventLink}", this.target.attr("data-href")).replace("{title}", this.target.attr("title"));
        a.iframeBox = jQuery(c).appendTo(a._config.appendTo).addClass("event-iframe-pop-show").on("click", "a.close", function (d) {
            d.preventDefault();
            a.hidden()
        });
        $LAB.script(JSF.jq_drag).wait(function () {
            a.iframeBox.draggable({
                handle: ".handle",
                cursor: "move",
                containment: [70, 40, jQuery(document).width() - a.iframeBox.width(), jQuery(document).height() - a.iframeBox.height()]
            })
        })
    },
    _buttonClickHanlder: function (a) {
        a.preventDefault();
        this.visible()
    }
};
window.creatEventIframe = creatEventIframe;
(function (e) {
    var f = function (g) {
        return g.indexOf("?") < 0 ? "?" : "&"
    };
    var a = {
        width: 400,
        height: 700,
        title: "六间房",
        target: "body"
    };
    var b = function (h) {
        var g = e.extend({}, a, h || {});
        var i = WebviewCreate(g);
        g.onWebviewReady && g.onWebviewReady(i);
        return i
    };
    window.openReactIframe = {
        open: function (j, l) {
            l = l || {};
            if (MyBrowser.name == "ie" && location.search.indexOf("pcgate") < 0) {
                return browserUpdate()
            }
            var m = this;
            var i = location.protocol + (location.host.indexOf("dev.v.6.cn") > -1 ? "//dev.m.6.cn" : "//m.6.cn");
            var h = location.protocol + (location.host.indexOf("dev.v.6.cn") > -1 ? "//dev.v.6.cn" : "//v.6.cn");
            var k = window.page && page.rid ? page.rid : "";
            switch (j) {
                case "taskCenter":
                    l = {
                        title: "任务系统",
                        url: "/appmate/task-center",
                        effect: "webview-iframe-right"
                    };
                    break;
                case "starFriends":
                    l = {
                        url: "/appmate/star-friends",
                        title: "星友会",
                        effect: "webview-iframe-right"
                    };
                    break;
                case "starCircle":
                    l = {
                        url: h + "/event/2022/constellation/indexWeek.php?rid=" + k,
                        title: "星神降临",
                        effect: "webview-iframe-right"
                    };
                    break;
                case "magicBox":
                    l = {
                        url: "/appmate/sum-magic-box?a-ruid=" + k,
                        title: "四季魔盒",
                        effect: "webview-iframe-right"
                    };
                    break;
                case "attemptPk":
                    l = {
                        url: "/appmate/day-group-pk?type=page&ruid=" + k,
                        title: "天团PK",
                        effect: "webview-iframe-right"
                    };
                    break;
                case "wulinPkBox":
                    l = {
                        url: "/appmate/wulin-pk?a-ruid=" + k,
                        title: "决战武林",
                        effect: "webview-iframe-right"
                    };
                    break;
                case "passCheckBox":
                    l = {
                        url: "/appmate/pass-check?a-ruid=" + k,
                        title: "六房通行证",
                        effect: "webview-iframe-right"
                    };
                    break;
                case "shakeUser":
                    l = {
                        url: "/appmate/shake-user-list",
                        title: "主播摇人",
                        effect: "webview-iframe-left",
                        extClass: "webview-iframe-shake-user"
                    };
                    break;
                case "dailyChargeWelfare":
                    l = {
                        url: "/appmate/promotion-collection?thepage=dailyChargeWelfare",
                        title: "幸运扭蛋",
                        cleanMode: true,
                        width: 438,
                        height: 538,
                        effect: "webview-iframe-center"
                    };
                    break;
                case "firstCharge":
                    l = {
                        url: "/appmate/promotion-collection?thepage=newFirstCharge",
                        title: "一折首充",
                        cleanMode: true,
                        width: 438,
                        height: 484,
                        effect: "webview-iframe-center"
                    };
                    break
            }
            if (l.url) {
                l.url = (l.url.indexOf("m.6.cn") > -1 || l.url.indexOf("v.6.cn") > -1 || l.url.indexOf("web.6.cn") > -1 ? "" : i) + l.url + f(l.url) + "platform=pc&a-ruid=" + k + "&i-origin=" + encodeURIComponent(location.origin);
                var g = getQueryString(l.url, "sign")
            } else {
                return console.log("openReactIframe未配置：" + j, l)
            }
            if (g) {
                l.sign = g
            }
            if (l.cleanMode) {
                l.extClass = "webview-no-border " + (l.extClass || "")
            }
            this._openWebview(l)
        },
        _openWebview: function (g) {
            if (window.WebviewCreate && window.pcGate) {
                b(g)
            } else {
                if (JSF.webview && JSF.pcgate) {
                    $LAB.script(JSF.webview).wait().script(JSF.pcgate).wait(function () {
                        b(g)
                    })
                } else {
                    Prompt.alert("打开失败，本页面不支持此功能")
                }
            }
        }
    };
    if (MyBrowser.name == "ie" && location.search.indexOf("pcgate") < 0) {
        return
    }
    var d = function (h) {
        var g = {
            RechargeGasStation_RCCenterEvent_Mod: {
                name: "充值加油站",
                isReact: false
            },
            yizhefirst: {
                name: "一折首充",
                type: "TenPercentDiscount_RCCenterEvent_Mod",
                isReact: false
            },
            sanyuan: {
                name: "三元惊喜",
                type: "SanYuan_RCCenterEvent_Mod",
                isReact: false
            },
            weekcard: {
                name: "特权周卡",
                type: "PrivilegeWeekCard_RCCenterEvent_Mod",
                isReact: false
            },
            yiyuanfuli: {
                name: "1元福利",
                type: "Cutefansbrand_RCCenterEvent_Mod",
                isReact: false
            },
            yiyuanchaozhi: {
                name: "一元超值礼包",
                isReact: false,
                type: "Yiyuancu_RCCenterEvent_Mod"
            },
            welfareDay: {
                name: "拆礼包",
                type: "UnpackGiftBag_RCCenterEvent_Mod",
                isReact: false
            },
            yiyuanCallback: {
                name: "天降好礼",
                type: "Tjhl_RCCenterEvent_Mod",
                isReact: false
            },
            newgift: {
                type: "RegGift_RCCenterEvent_Mod",
                name: "新人礼包",
                isReact: false
            },
            LuckGashapon_RCCenterEvent_Mod: {
                name: "幸运扭蛋",
                isReact: false,
                pcgateName: "luckEgg"
            },
            starfriends: {
                name: "畅玩领好礼",
                type: "ReceiveGiftHaveFun_RCCenterEvent_Mod",
                isReact: false
            },
            starlight: {
                name: "星友会",
                type: "starlight"
            }
        };
        switch (h.type) {
            case g.sanyuan.type:
                new WebviewCreate({
                    url: "/event/2022/sylotter/index.php?rid=" + page.rid + "&&platform=pc",
                    title: "三元惊喜",
                    width: 400,
                    height: 444,
                    pointer: false,
                    extClass: "webview-gift2542",
                    effect: "webview-iframe-scale",
                    target: "body",
                    drag: false
                });
                break;
            case g.yizhefirst.type:
                window.openReactIframe.open("firstCharge");
                break;
            case g.weekcard.type:
                roomWeekCard.init();
                break;
            case g.yiyuanchaozhi.type:
                Room.yiyuancuNew.visible();
                break;
            case g.yiyuanfuli.type:
                Room.oneYuanFC.init(2);
                break;
            case g.welfareDay.type:
                Room.welfareDay.visible();
                break;
            case g.yiyuanCallback.type:
                Room.yiyuanCallback.show(h.event_data);
            case g.newgift.type:
                Room.present.select_tab(11);
                break;
            case g.starfriends.type:
                window.openReactIframe && window.openReactIframe.open("playgift", {
                    url: "/appmate/star-friends?thepage=playgift",
                    title: "畅玩领好礼",
                    onWebviewReady: function (i) {
                        that.webView3 = i
                    }
                });
                break;
            case g.starlight.type:
                window.openReactIframe && window.openReactIframe.open("starFriends");
                break
        }
        if (h.type == g.sanyuan.type) {}
    };
    var c = function () {
        pcGate.addApi("alert", function (g) {
            Prompt.alert(g.msg)
        });
        pcGate.addApi("setTitle", function (h, g) {
            if (window.frameCache && window.frameCache[g.port.name]) {
                window.frameCache[g.port.name].setTitle({
                    content: h
                })
            }
        });
        pcGate.addApi("pcRoute", function (j) {
            j = j || {};
            switch (j.route) {
                case "openCard":
                    UserCard_win.getCard(j.uid, j.whereFrom || "");
                    break;
                case "openIMConversation":
                    IMR.openUserCvs(j.uid);
                    break;
                case "openReact":
                    var i = j.data;
                    openReactIframe.open(i.route || "", i);
                    break;
                case "openUrl":
                    if (j.url) {
                        window.open(j.url)
                    }
                    break;
                case "openRoom":
                    if (j.rid > 0) {
                        window.open("/" + j.rid)
                    }
                    break;
                case "giftBox":
                    if (window.Room && Room.present) {
                        var h = j.gid || 1;
                        Room.present.select_gift(h, true)
                    } else {
                        Prompt.alert("请到直播间送礼！")
                    }
                    break;
                case "luckEgg":
                    window.openReactIframe.open("dailyChargeWelfare");
                    break;
                case "fansGroup":
                    if (window.fansGroup && fansGroup.open) {
                        fansGroup.open()
                    } else {
                        Prompt.alert("请到直播间参与！")
                    }
                    break;
                case "chargecenter":
                    d(j);
                    break;
                case "lottery":
                    var g = e(".gift-lottery-btn");
                    if (g[0]) {
                        g.eq(0).trigger("click")
                    } else {
                        Prompt.alert("请到直播间发福利！")
                    }
                    break;
                case "roomChat":
                    if (window.Room && Room.chatList) {
                        Room.chatList.sendInput.focus()
                    } else {
                        Prompt.alert("请到直播间发言！")
                    }
                    break;
                case "feed":
                    window.open("//v.6.cn/#btn_feed");
                    break;
                case "bindMobile":
                    window.open(location.origin + "/user/userinfo/uinfo.php?step=phone");
                    break;
                case "toast":
                    Prompt.alert(j.msg);
                    break
            }
        })
    };
    if (window.pcGate) {
        c()
    } else {
        if (JSF.pcgate) {
            $LAB.script(JSF.pcgate).wait(function () {
                c()
            })
        }
    }
})(jQuery);
window.getNicknameHtml = function (a, c) {
    if (!a) {
        return ""
    }
    if (jQuery.isArray(a)) {
        return ""
    }
    if (typeof a === "object" && !a.title) {
        return ""
    }
    c = c || {};
    var e = {
        baseClass: "nickname-title",
        sizeClass: "nickname-s",
        styleClass: "",
        cardstr: "",
        tag: "span",
        typeClass: ""
    };
    var b = "";
    if (typeof a === "object") {
        b = a.title || "";
        e.typeClass = "nickname-type-" + a.type;
        if (a.uid) {
            c.uid = c.uid || a.uid
        }
    } else {
        b = a
    }
    if (c) {
        if (c.uid && !c.notOpenCard) {
            e.cardstr = 'style="cursor:pointer;" onclick="UserCard_win.getCard(' + c.uid + '); return false;"'
        }
        if (c.size) {
            e.sizeClass = "nickname-" + c.size
        }
        if (c.tag) {
            e.tag = c.tag
        }
        if (c.style) {
            e.styleClass = "nickname-title-" + c.style
        }
    }
    var d = '<{tag} class="{baseClass} {sizeClass} {styleClass} {nickTypeClass}" {openCard}>{nickname}</{tag}>';
    var f = d.replace(/{nickname}/g, b).replace(/{baseClass}/g, e.baseClass).replace(/{sizeClass}/g, e.sizeClass).replace(/{styleClass}/g, e.styleClass).replace(/{nickTypeClass}/g, e.typeClass).replace(/{tag}/g, e.tag).replace(/{openCard}/g, e.cardstr);
    return f
};
window.autoSwitchAcount = function (a) {
    Prompt.create({
        btn_sure: {
            text: "知道了"
        },
        content: "<p>" + a + '<br /><a href="/user/autoSwitchAcount.php" target="_blank">设置自动切换<i></i></a></p>',
        wrapClass: "auto-switch-acount-pop",
        callback: function (b) {
            if (b) {
                Login.toLogin()
            }
        }
    })
};
window.limitConsume = function (a) {
    Prompt.create({
        btn_sure: {
            text: "知道了"
        },
        content: '<p class="p1">礼物消费提醒</p><p class="p2">您今日消费已达' + a + "元</p>",
        wrapClass: "auto-switch-acount-pop consume-notice"
    })
};
(function (b) {
    var a = {
        classes: ["listup-intro-wrap", "listup-guide-wrap", "listup-alert-wrap", "listup-wrap-vis"],
        init: function () {
            b.ajax({
                url: "/js/tpls/listup.html",
                dataType: "text"
            }).done(b.proxy(this, "_templateReady"))
        },
        _templateReady: function (d) {
            var c = b(d).appendTo(document.body);
            this.wrap = c.filter(".listup-wrap").on("click", "a", b.proxy(this, "_clickHandler"));
            this._vis()
        },
        _clickHandler: function (d) {
            d.preventDefault();
            var c = b(d.currentTarget);
            if (c.hasClass("close") || c.hasClass("js-close")) {
                this.hidden(true)
            } else {
                if (c.hasClass("js-open-task")) {
                    window.openReactIframe.open("taskCenter")
                } else {
                    if (c.hasClass("js-open-intro")) {
                        this.hidden();
                        setTimeout(b.proxy(this, "visible"), 300)
                    }
                }
            }
        },
        visible: function (c) {
            this.t = c || 0;
            this.hidden();
            if (!this.wrap) {
                this.init()
            } else {
                this._vis()
            }
        },
        _vis: function () {
            var f = this.t;
            var d = this.classes;
            var c = d[0];
            switch (f) {
                case 1:
                    c = d[1];
                    break;
                case 2:
                    c = d[2];
                    break
            }
            var e = this.wrap.css("display", "block").addClass(c);
            setTimeout(function () {
                e.addClass(d[3])
            }, 100)
        },
        hidden: function (d) {
            var c = this.wrap;
            if (c) {
                c.removeClass(this.classes.join(" "));
                clearTimeout(this.htm);
                if (d) {
                    this.htm = setTimeout(function () {
                        c.css("display", "none")
                    }, 300)
                }
            }
        }
    };
    window.openOnceListupAlert = function () {
        if (window.localStorage) {
            var c = localStorage.getItem("listup-alert");
            if (!c) {
                window.listupPopup.visible(2);
                localStorage.setItem("listup-alert", 1)
            }
        }
    };
    window.openlistupPopup = function () {
        window.listupPopup.visible()
    };
    b(document.body).on("click", "a.icon-listup-help", function () {
        window.listupPopup.visible()
    });
    if (window.popBase) {
        window.popBase.onReady("popup.rankUpdateTips", function (c) {
            c.on("onVisible", function () {
                window.listupPopup.visible(1)
            });
            c.on("onHidden", function () {
                window.listupPopup.hidden()
            })
        })
    }
    window.listupPopup = a
})(jQuery);
(function (a) {
    var b = location.hostname.indexOf("dev") > -1;
    window.newRank = {
        _useNew: b ? false : false,
        _isReady: 0,
        _ver: null,
        _callback: [],
        _storageKey: "new-rank-config",
        onReady: function (c) {
            if (this._isReady) {
                c()
            } else {
                this._callback.push(c)
            }
        },
        isReady: function () {
            return !!this._isReady
        },
        isUseNew: function () {
            return !!this._useNew
        },
        setState: function (c) {
            this._useNew = !!c
        },
        getUserRich: function () {
            var d = this.isUseNew();
            var c = d ? _puser.new_rich : _puser.rich;
            return {
                useNew: d,
                rich: c
            }
        },
        getNewRankFromOld: function (c) {
            c = Number(c);
            if (c === 0) {
                return 0
            }
            var d = this.getConfig().old2new_list;
            var e = d[c];
            if (!e) {
                console.log("未找到对应等级：", c)
            }
            return e
        },
        getRankConfig: function (e, h) {
            var d = this.getConfig();
            if (!d.new_pre) {
                console.log("等级数据未加载，请使用newRank.onReady方法调用");
                return
            }
            var g = !h ? d.new_pre : d.old_pre;
            var f = !h ? d.new_list : d.old_list;
            var c = f[e];
            if (!c) {
                console.log("未获取到" + (h ? "老版本" : "新版本") + "等级配置:" + e, f);
                return
            }
            return a.extend(c, {
                src: g + c.u
            })
        },
        getRankIcon: function (i) {
            var d = this._useNew;
            var h = d ? i.newCoin6rank : i.coin6rank;
            var j = d ? i.newCoin6pic : i.coin6pic;
            if (d && typeof h == "undefined") {
                h = i.coin6rank;
                console.trace && console.trace("need add newCoin6rank")
            }
            var k = d ? "new-rich new-rich-" : "rich";
            var c = d ? "new-rich-pic" : "rich-pic";
            var n = i.fid ? " rich-" + i.fid : "";
            var f = j ? c : k + h;
            if (i.isSupMystery == 1) {
                return '<i class="rich280' + n + '"></i>'
            }
            var l = d ? "" : richStarsEffect(i.prop || []);
            var g = "";
            var m = f + n;
            if (j) {
                g = '<img src="' + j + '" />'
            } else {
                if (d) {
                    var e = this.getRankConfig(h);
                    if (e) {
                        g = '<img src="' + e.src + '" />'
                    }
                }
            }
            return ('<i class="' + m + '" coin6pic="1" oldrank="' + i.coin6rank + '" newrank="' + i.newCoin6rank + '">' + g + (l ? l.flash : "") + "</i>")
        },
        getOriginConfig: function () {
            var c = this._originConfig;
            if (!c || !c.ver || !c.list) {
                c = this._getStorage()
            }
            return c
        },
        getConfig: function () {
            return this._listConfig || {}
        },
        getVersion: function () {
            return this._ver || 0
        },
        loadRes: function () {
            if (this._xhr) {
                return
            }
            this._xhr = a.getJSON("/coop/mobile/index.php", {
                padapi: "coop-mobile-rankIconUpdate.php",
                f: "pc",
                ver: this.getVersion()
            }).done(a.proxy(this, "_loadResBack"))
        },
        _loadResBack: function (e) {
            if (e.flag == "001") {
                var f = e.content;
                if (f.url) {
                    var d = this._replaceUrl(f.url);
                    $LAB.script(d).wait(a.proxy(this, "_resReady"))
                } else {
                    var c = this.getOriginConfig();
                    if (c) {
                        window.rankIconConfig = {
                            ver: c.ver,
                            list: c.list
                        };
                        this._resReady()
                    } else {
                        console.log("财富等级资源获取异常:" + c)
                    }
                }
            } else {
                console.log("财富等级资源获取异常:" + e.flag)
            }
        },
        _setStorage: function (c) {
            if (window.localStorage) {
                localStorage.setItem(this._storageKey, a.toJSON(c))
            }
        },
        _getStorage: function () {
            var c;
            if (window.localStorage) {
                var d = localStorage.getItem(this._storageKey);
                c = a.parseJSON(d)
            }
            return c
        },
        _arr2obj: function (c) {
            var d = {};
            a.each(c, function (e, f) {
                if (a.type(f) == "array") {
                    d[f[0]] = f[1]
                } else {
                    d[f.r] = f
                }
            });
            return d
        },
        _replaceUrl: function (c) {
            return c.replace(/https?:/, location.protocol).replace("xiu123.cn", "6rooms.com")
        },
        _resReady: function () {
            var c = (this._originConfig = window.rankIconConfig);
            this._ver = c.ver;
            this._listConfig = a.extend({}, c.list, {
                old_pre: this._replaceUrl(c.list.old_pre),
                new_pre: this._replaceUrl(c.list.new_pre),
                old_list: this._arr2obj(c.list.old_list),
                new_list: this._arr2obj(c.list.new_list),
                old2new_list: this._arr2obj(c.list.old2new_list)
            });
            this._setNewWealth(this._listConfig.new_list);
            this._setStorage(c);
            this._readyBack();
            this._isReady = 1;
            this._xhr = null
        },
        _setNewWealth: function (d) {
            var c = {};
            a.each(d, function (e, f) {
                if (e > 0) {
                    c[e] = f.c
                }
            });
            Rank.newWealth = c
        },
        _readyBack: function () {
            for (var c = 0; c < this._callback.length; c++) {
                try {
                    this._callback[c]()
                } catch (d) {
                    console.log(d.message)
                }
            }
        }
    };
    window.openNewRankIframe = function (f, i) {
        var h = 400;
        var c = 570;
        var g = _puser.uid;
        var e = "/appmate/new-rich-rank/?uid=" + g;
        var d = "webview-top-index";
        if (f == "guide") {
            e = e + "&thepage=guide&event_data=" + a.toJSON(i);
            d += " webview-no-shadow";
            c = 650
        } else {
            if (f == "intro") {
                e = e + "&thepage=intro"
            } else {
                if (f == "priv") {
                    e = e + "&thepage=priv&tuid=" + i
                }
            }
        }
        window.openReactIframe.open("newrank-" + f, {
            url: e,
            title: "用户等级升级",
            width: h,
            height: c,
            pointer: false,
            extClass: d,
            effect: "webview-iframe-scale",
            cleanMode: true
        })
    };
    a(document.body).on("click", "a", function (f) {
        var c = a(f.currentTarget);
        var d = c.attr("richpc");
        if (d) {
            f.preventDefault();
            window.openNewRankIframe(d, _puser.uid)
        }
    });
    if (window.popBase) {
        window.popBase.onReady("popup.newCoin6rankTips", function (c) {
            var d = c.getConfig().event_data;
            c.on("onVisible", function () {
                openNewRankIframe("guide", d)
            })
        })
    }
    if (window.page && page.useNewRank) {
        newRank.setState(true)
    }
    if (_puser.uid) {
        a.getJSON("/help/rankTest.php").done(function (c) {
            if (c.flag == "001") {
                var e = c.content;
                if (e.newRankIsRun == "1" && a.inArray(Number(_puser.uid), e.uids) > -1) {
                    newRank.setState(true);
                    newRank.loadRes()
                }
            }
        })
    }
})(jQuery);
(function (a) {
    var b = '<div class="wrapBox7" style="position:fixed; top:50%;left:50%;transform: translate(-50%,-50%); z-index:999; background: transparent; display: flex; justify-content: center; align-items: center;" ><div style="height: 488px;width:283px;background-image: url(//vr0.6rooms.com/images/events/vipClub2022/yaoqing2.png); background-repeat: no-repeat;background-size: 100% 100%; position: relative;"><div class="joinButton" style="cursor:pointer; width: 243px;height: 50px;text-align: center;line-height:50px; background: linear-gradient(180deg, #FFF7E8 0%, #FFD891 100%);border-radius: 4px;position:absolute;bottom:24px;left:50%;transform:translate(-50%, 0%);font-weight: 600;color: #904721;">立即加入</div><img class="close" style="position: absolute; bottom: -60px; left: 50%; transform: translate(-50%, 0%); width: 34px;height: 34px;" src="https://vr1.6rooms.com/tao/i/r4/c4671d1cebfaeeeffb692e95cc721fa6.png" /></div>';
    (" </div>");
    window.popBase.onReady("popup.vipActivate", function (c) {
        var d = a(b);
        c.on("onVisible", function () {
            Mask.create();
            d.appendTo(document.body)
        });
        a("body").on("click", ".wrapBox7 .close", function () {
            d.remove();
            Mask.remove()
        });
        a("body").on("click", ".wrapBox7 .joinButton", function () {
            d.remove();
            Mask.remove();
            var f = origin + "/club/index.php?target=joinClub";
            var e = {
                sign: "VIPClub",
                url: f,
                title: "六间房",
                effect: "webview-iframe-right"
            };
            window.openReactIframe && window.openReactIframe.open("reactPage", e)
        });
        c.on("onHidden", function () {
            d.remove();
            Mask.remove()
        })
    })
})(jQuery);